From: Cedric Le Goater <clg@fr.ibm.com>
This patch is the first step in making the refrigerator() available
to all architectures, even for those without power management.
The purpose of such a change is to be able to use the refrigerator()
in a new container subsystem which will implement a container freezer.
The TIF_FREEZE value should be checked by each arch MAINTAINER.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
---
include/asm-alpha/thread_info.h | 2 ++
include/asm-arm26/thread_info.h | 2 ++
include/asm-avr32/thread_info.h | 2 ++
include/asm-cris/thread_info.h | 2 ++
include/asm-h8300/thread_info.h | 2 ++
include/asm-m32r/thread_info.h | 2 ++
include/asm-m68k/thread_info.h | 1 +
include/asm-m68knommu/thread_info.h | 2 ++
include/asm-parisc/thread_info.h | 2 ++
include/asm-s390/thread_info.h | 2 ++
include/asm-sh64/thread_info.h | 2 ++
include/asm-sparc/thread_info.h | 2 ++
include/asm-sparc64/thread_info.h | 2 ++
include/asm-um/thread_info.h | 2 ++
include/asm-v850/thread_info.h | 2 ++
include/asm-xtensa/thread_info.h | 2 ++
16 files changed, 31 insertions(+)
Index: 2.6.22-rc4-mm2/include/asm-alpha/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-alpha/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-alpha/thread_info.h
@@ -76,12 +76,14 @@ register struct thread_info *__current_t
#define TIF_UAC_SIGBUS 7
#define TIF_MEMDIE 8
#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
+#define TIF_FREEZE 10
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
/* Work to do on interrupt/exception return. */
#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
Index: 2.6.22-rc4-mm2/include/asm-arm26/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-arm26/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-arm26/thread_info.h
@@ -121,12 +121,14 @@ extern void free_thread_info(struct thre
#define TIF_USED_FPU 16
#define TIF_POLLING_NRFLAG 17
#define TIF_MEMDIE 18
+#define TIF_FREEZE 19
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_USED_FPU (1 << TIF_USED_FPU)
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
/*
* Change these and you break ASM code in entry-common.S
Index: 2.6.22-rc4-mm2/include/asm-avr32/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-avr32/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-avr32/thread_info.h
@@ -83,6 +83,7 @@ static inline struct thread_info *curren
#define TIF_MEMDIE 6
#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */
#define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */
+#define TIF_FREEZE 19
#define TIF_USERSPACE 31 /* true if FS sets userspace */
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
@@ -94,6 +95,7 @@ static inline struct thread_info *curren
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
/* XXX: These two masks must never span more than 16 bits! */
/* work to do on interrupt/exception return */
Index: 2.6.22-rc4-mm2/include/asm-cris/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-cris/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-cris/thread_info.h
@@ -83,11 +83,13 @@ struct thread_info {
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 17
+#define TIF_FREEZE 19
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
Index: 2.6.22-rc4-mm2/include/asm-h8300/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-h8300/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-h8300/thread_info.h
@@ -91,12 +91,14 @@ static inline struct thread_info *curren
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
+#define TIF_FREEZE 19
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
Index: 2.6.22-rc4-mm2/include/asm-m32r/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-m32r/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-m32r/thread_info.h
@@ -153,6 +153,7 @@ static inline unsigned int get_thread_fa
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
/* 31..28 fault code */
#define TIF_MEMDIE 17
+#define TIF_FREEZE 19
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
@@ -160,6 +161,7 @@ static inline unsigned int get_thread_fa
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_IRET (1<<TIF_IRET)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
Index: 2.6.22-rc4-mm2/include/asm-m68k/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-m68k/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-m68k/thread_info.h
@@ -58,5 +58,6 @@ struct thread_info {
#define TIF_DELAYED_TRACE 14 /* single step a syscall */
#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
#define TIF_MEMDIE 16
+#define TIF_FREEZE 19
#endif /* _ASM_M68K_THREAD_INFO_H */
Index: 2.6.22-rc4-mm2/include/asm-m68knommu/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-m68knommu/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-m68knommu/thread_info.h
@@ -88,12 +88,14 @@ static inline struct thread_info *curren
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
+#define TIF_FREEZE 19
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
Index: 2.6.22-rc4-mm2/include/asm-parisc/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-parisc/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-parisc/thread_info.h
@@ -62,6 +62,7 @@ struct thread_info {
#define TIF_32BIT 4 /* 32 bit binary */
#define TIF_MEMDIE 5
#define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
+#define TIF_FREEZE 19
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
@@ -69,6 +70,7 @@ struct thread_info {
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
#define _TIF_32BIT (1 << TIF_32BIT)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
+#define _TIF_FREEZE (1 << TIF_FREEZE)
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \
_TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
Index: 2.6.22-rc4-mm2/include/asm-s390/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-s390/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-s390/thread_info.h
@@ -101,6 +101,7 @@ static inline struct thread_info *curren
TIF_NEED_RESCHED */
#define TIF_31BIT 18 /* 32bit process */
#define TIF_MEMDIE 19
+#define TIF_FREEZE 20
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
@@ -113,6 +114,7 @@ static inline struct thread_info *curren
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_31BIT (1<<TIF_31BIT)
+#define _TIF_FREEZE (1<<TIF_FREEZE)
#endif /* __KERNEL__ */
Index: 2.6.22-rc4-mm2/include/asm-sh64/thread_info.h
===================================================================
--- 2.6.22-rc4-mm2.orig/include/asm-sh64/thread_info.h
+++ 2.6.22-rc4-mm2/include/asm-sh64/thread_info.h
@@ -79,12 +79,14 @@ static inline struct thread_info *curren
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define T
...