Add include/linux/freezer.h and move definitions from sched.h
Subsystems (37)
PATCH 1/1 Add include/linux/freezer.h and move definitions from sched.h
Move process freezing functions from include/linux/sched.h to freezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything.
Prepared against current git.
arch/arm/kernel/signal.c +1 -0
@@ -11,6 +11,7 @@ #include <linux/errno.h>#include <linux/signal.h> #include <linux/ptrace.h> #include <linux/personality.h> +#include <linux/freezer.h> #include <asm/cacheflush.h> #include <asm/ucontext.h>
arch/avr32/kernel/signal.c +1 -1
@@ -15,7 +15,7 @@ #include <linux/mm.h>#include <linux/errno.h> #include <linux/ptrace.h> #include <linux/unistd.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <asm/uaccess.h> #include <asm/ucontext.h>
arch/frv/kernel/signal.c +1 -1
@@ -21,7 +21,7 @@ #include <linux/wait.h>#include <linux/ptrace.h> #include <linux/unistd.h> #include <linux/personality.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/cacheflush.h>
arch/h8300/kernel/signal.c +1 -1
@@ -38,7 +38,7 @@ #include <linux/highuid.h>#include <linux/personality.h> #include <linux/tty.h> #include <linux/binfmts.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <asm/setup.h> #include <asm/uaccess.h>
arch/i386/kernel/io_apic.c +1 -0
@@ -34,6 +34,7 @@ #include <linux/sysdev.h>#include <linux/pci.h> #include <linux/msi.h> #include <linux/htirq.h> +#include <linux/freezer.h> #include <asm/io.h> #include <asm/smp.h>
arch/m32r/kernel/signal.c +1 -1
@@ -21,7 +21,7 @@ #include <linux/wait.h>#include <linux/unistd.h> #include <linux/stddef.h> #include <linux/personality.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <asm/cacheflush.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/powerpc/kernel/signal_32.c +1 -1
@@ -36,7 +36,7 @@ #include <linux/unistd.h>#include <linux/stddef.h> #include <linux/tty.h> #include <linux/binfmts.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #endif #include <asm/uaccess.h>
arch/sh/kernel/signal.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/tty.h>#include <linux/elf.h> #include <linux/personality.h> #include <linux/binfmts.h> +#include <linux/freezer.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/sh64/kernel/signal.c +1 -1
@@ -22,7 +22,7 @@ #include <linux/signal.h>#include <linux/errno.h> #include <linux/wait.h> #include <linux/personality.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/ptrace.h> #include <linux/unistd.h> #include <linux/stddef.h>
drivers/block/pktcdvd.c +1 -1
@@ -54,7 +54,7 @@ #include <linux/file.h>#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/miscdevice.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/mutex.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_ioctl.h>
drivers/char/hvc_console.c +1 -0
@@ -38,6 +38,7 @@ #include <linux/tty_flip.h>#include <linux/sched.h> #include <linux/spinlock.h> #include <linux/delay.h> +#include <linux/freezer.h> #include <asm/uaccess.h>
drivers/edac/edac_mc.c +1 -0
@@ -28,6 +28,7 @@ #include <linux/list.h>#include <linux/sysdev.h> #include <linux/ctype.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <asm/uaccess.h> #include <asm/page.h> #include <asm/edac.h>
drivers/ieee1394/nodemgr.c +1 -0
@@ -15,6 +15,7 @@ #include <linux/slab.h>#include <linux/delay.h> #include <linux/kthread.h> #include <linux/moduleparam.h> +#include <linux/freezer.h> #include <asm/atomic.h> #include "csr.h"
drivers/input/gameport/gameport.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/delay.h>#include <linux/kthread.h> #include <linux/sched.h> /* HZ */ #include <linux/mutex.h> +#include <linux/freezer.h> /*#include <asm/io.h>*/
drivers/input/serio/serio.c +1 -0
@@ -35,6 +35,7 @@ #include <linux/sched.h>#include <linux/slab.h> #include <linux/kthread.h> #include <linux/mutex.h> +#include <linux/freezer.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Serio abstraction core" );
drivers/macintosh/therm_adt746x.c +1 -0
@@ -24,6 +24,7 @@ #include <linux/wait.h>#include <linux/suspend.h> #include <linux/kthread.h> #include <linux/moduleparam.h> +#include <linux/freezer.h> #include <asm/prom.h> #include <asm/machdep.h>
drivers/macintosh/via-pmu.c +1 -1
@@ -42,7 +42,7 @@ #include <linux/init.h>#include <linux/interrupt.h> #include <linux/device.h> #include <linux/sysdev.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/syscalls.h> #include <linux/cpu.h> #include <asm/prom.h>
drivers/macintosh/windfarm_core.c +1 -0
@@ -34,6 +34,7 @@ #include <linux/reboot.h>#include <linux/device.h> #include <linux/platform_device.h> #include <linux/mutex.h> +#include <linux/freezer.h> #include <asm/prom.h>
drivers/md/md.c +1 -1
@@ -39,10 +39,10 @@ #include <linux/raid/md.h>#include <linux/raid/bitmap.h> #include <linux/sysctl.h> #include <linux/buffer_head.h> /* for invalidate_bdev */ -#include <linux/suspend.h> #include <linux/poll.h> #include <linux/mutex.h> #include <linux/ctype.h> +#include <linux/freezer.h> #include <linux/init.h>
drivers/media/dvb/dvb-core/dvb_frontend.c +1 -1
@@ -34,7 +34,7 @@ #include <linux/poll.h>#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/list.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/jiffies.h> #include <asm/processor.h>
drivers/media/video/msp3400-driver.c +1 -1
@@ -56,7 +56,7 @@ #include <media/v4l2-common.h>#include <media/tvaudio.h> #include <media/msp3400.h> #include <linux/kthread.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include "msp3400-driver.h" /* ---------------------------------------------------------------------- */
drivers/media/video/tvaudio.c +1 -0
@@ -29,6 +29,7 @@ #include <linux/i2c-algo-bit.h>#include <linux/init.h> #include <linux/smp_lock.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <media/tvaudio.h> #include <media/v4l2-common.h>
drivers/media/video/video-buf-dvb.c +1 -1
@@ -20,7 +20,7 @@ #include <linux/device.h>#include <linux/fs.h> #include <linux/kthread.h> #include <linux/file.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <media/video-buf.h> #include <media/video-buf-dvb.h>
drivers/media/video/vivi.c +1 -0
@@ -36,6 +36,7 @@ #include <media/video-buf.h>#include <media/v4l2-common.h> #include <linux/kthread.h> #include <linux/highmem.h> +#include <linux/freezer.h> /* Wake up at about 30 fps */ #define WAKE_NUMERATOR 30
drivers/mfd/ucb1x00-ts.c +1 -1
@@ -28,7 +28,7 @@ #include <linux/delay.h>#include <linux/string.h> #include <linux/input.h> #include <linux/device.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/slab.h> #include <linux/kthread.h>
drivers/net/irda/stir4200.c +1 -0
@@ -51,6 +51,7 @@ #include <linux/delay.h>#include <linux/usb.h> #include <linux/crc32.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <net/irda/irda.h> #include <net/irda/irlap.h> #include <net/irda/irda_device.h>
drivers/net/wireless/airo.c +1 -0
@@ -49,6 +49,7 @@ #include <linux/pci.h>#include <asm/uaccess.h> #include <net/ieee80211.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include "airo.h"
drivers/pcmcia/cs.c +1 -0
@@ -29,6 +29,7 @@ #include <linux/pm.h>#include <linux/pci.h> #include <linux/device.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <asm/system.h> #include <asm/irq.h>
drivers/pnp/pnpbios/core.c +1 -0
@@ -61,6 +61,7 @@ #include <linux/spinlock.h>#include <linux/dmi.h> #include <linux/delay.h> #include <linux/acpi.h> +#include <linux/freezer.h> #include <asm/page.h> #include <asm/desc.h>
drivers/usb/core/hub.c +1 -0
@@ -22,6 +22,7 @@ #include <linux/usb.h>#include <linux/usbdevice_fs.h> #include <linux/kthread.h> #include <linux/mutex.h> +#include <linux/freezer.h> #include <asm/semaphore.h> #include <asm/uaccess.h>
drivers/usb/gadget/file_storage.c +1 -1
@@ -250,7 +250,7 @@ #include <linux/signal.h>#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/string.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/utsname.h> #include <linux/usb_ch9.h>
drivers/usb/storage/usb.c +1 -1
@@ -49,7 +49,7 @@#include <linux/sched.h> #include <linux/errno.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h>
drivers/w1/w1.c +1 -0
@@ -31,6 +31,7 @@ #include <linux/device.h>#include <linux/slab.h> #include <linux/sched.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <asm/atomic.h>
fs/afs/kafsasyncd.c +1 -0
@@ -20,6 +20,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/sched.h> #include <linux/completion.h> +#include <linux/freezer.h> #include "cell.h" #include "server.h" #include "volume.h"
fs/afs/kafstimod.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/sched.h> #include <linux/completion.h> +#include <linux/freezer.h> #include "cell.h" #include "volume.h" #include "kafstimod.h"
fs/cifs/cifsfs.c +1 -0
@@ -34,6 +34,7 @@ #include <linux/vfs.h>#include <linux/mempool.h> #include <linux/delay.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include "cifsfs.h" #include "cifspdu.h" #define DECLARE_GLOBALS_HERE
fs/cifs/connect.c +1 -0
@@ -31,6 +31,7 @@ #include <linux/mempool.h>#include <linux/delay.h> #include <linux/completion.h> #include <linux/pagevec.h> +#include <linux/freezer.h> #include <asm/uaccess.h> #include <asm/processor.h> #include "cifspdu.h"
fs/jbd/journal.c +1 -1
@@ -31,7 +31,7 @@ #include <linux/slab.h>#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/mm.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/pagemap.h> #include <linux/kthread.h> #include <linux/poison.h>
fs/jbd2/journal.c +1 -1
@@ -31,7 +31,7 @@ #include <linux/slab.h>#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/mm.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/pagemap.h> #include <linux/kthread.h> #include <linux/poison.h>
fs/jffs/intrep.c +1 -0
@@ -66,6 +66,7 @@ #include <asm/byteorder.h>#include <linux/smp_lock.h> #include <linux/time.h> #include <linux/ctype.h> +#include <linux/freezer.h> #include "intrep.h" #include "jffs_fm.h"
fs/jffs2/background.c +1 -0
@@ -16,6 +16,7 @@ #include <linux/jffs2.h>#include <linux/mtd/mtd.h> #include <linux/completion.h> #include <linux/sched.h> +#include <linux/freezer.h> #include "nodelist.h"
fs/jfs/jfs_logmgr.c +1 -1
@@ -67,7 +67,7 @@ #include <linux/completion.h>#include <linux/kthread.h> #include <linux/buffer_head.h> /* for sync_blockdev() */ #include <linux/bio.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/delay.h> #include <linux/mutex.h> #include "jfs_incore.h"
fs/jfs/jfs_txnmgr.c +1 -1
@@ -46,7 +46,7 @@ #include <linux/fs.h>#include <linux/vmalloc.h> #include <linux/smp_lock.h> #include <linux/completion.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/kthread.h>
fs/lockd/clntproc.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/fs.h>#include <linux/nfs_fs.h> #include <linux/utsname.h> #include <linux/smp_lock.h> +#include <linux/freezer.h> #include <linux/sunrpc/clnt.h> #include <linux/sunrpc/svc.h> #include <linux/lockd/lockd.h>
fs/xfs/linux-2.6/xfs_buf.c +1 -0
@@ -31,6 +31,7 @@ #include <linux/hash.h>#include <linux/kthread.h> #include <linux/migrate.h> #include <linux/backing-dev.h> +#include <linux/freezer.h> #include "xfs_linux.h" STATIC kmem_zone_t *xfs_buf_zone;
fs/xfs/linux-2.6/xfs_super.c +1 -0
@@ -56,6 +56,7 @@ #include <linux/mount.h>#include <linux/mempool.h> #include <linux/writeback.h> #include <linux/kthread.h> +#include <linux/freezer.h> STATIC struct quotactl_ops xfs_quotactl_operations; STATIC struct super_operations xfs_super_operations;
include/linux/freezer.h new file +84 -0
84 lines not on this page · raw message
include/linux/sched.h +0 -81
87 lines not on this page · raw message
init/do_mounts_initrd.c +1 -0
@@ -6,6 +6,7 @@ #include <linux/ext2_fs.h>#include <linux/romfs_fs.h> #include <linux/initrd.h> #include <linux/sched.h> +#include <linux/freezer.h> #include "do_mounts.h"
kernel/audit.c +1 -0
@@ -57,6 +57,7 @@ #include <linux/skbuff.h>#include <linux/netlink.h> #include <linux/selinux.h> #include <linux/inotify.h> +#include <linux/freezer.h> #include "audit.h"
kernel/power/process.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/interrupt.h>#include <linux/suspend.h> #include <linux/module.h> #include <linux/syscalls.h> +#include <linux/freezer.h> /* * Timeout for stopping processes
kernel/rtmutex-tester.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/smp_lock.h>#include <linux/spinlock.h> #include <linux/sysdev.h> #include <linux/timer.h> +#include <linux/freezer.h> #include "rtmutex.h"
kernel/sched.c +1 -1
@@ -34,7 +34,7 @@ #include <linux/debug_locks.h>#include <linux/security.h> #include <linux/notifier.h> #include <linux/profile.h> -#include <linux/suspend.h> +#include <linux/freezer.h> #include <linux/vmalloc.h> #include <linux/blkdev.h> #include <linux/delay.h>
kernel/signal.c +1 -0
@@ -23,6 +23,7 @@ #include <linux/syscalls.h>#include <linux/ptrace.h> #include <linux/signal.h> #include <linux/capability.h> +#include <linux/freezer.h> #include <asm/param.h> #include <asm/uaccess.h> #include <asm/unistd.h>
mm/pdflush.c +1 -0
@@ -21,6 +21,7 @@ #include <linux/fs.h> // Needed by writ#include <linux/writeback.h> // Prototypes pdflush_operation() #include <linux/kthread.h> #include <linux/cpuset.h> +#include <linux/freezer.h> /*
mm/vmscan.c +1 -0
@@ -36,6 +36,7 @@ #include <linux/notifier.h>#include <linux/rwsem.h> #include <linux/delay.h> #include <linux/kthread.h> +#include <linux/freezer.h> #include <asm/tlbflush.h> #include <asm/div64.h>
net/rxrpc/krxiod.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/sched.h>#include <linux/completion.h> #include <linux/spinlock.h> #include <linux/init.h> +#include <linux/freezer.h> #include <rxrpc/krxiod.h> #include <rxrpc/transport.h> #include <rxrpc/peer.h>
net/rxrpc/krxsecd.c +1 -0
@@ -27,6 +27,7 @@ #include <rxrpc/peer.h>#include <rxrpc/call.h> #include <linux/udp.h> #include <linux/ip.h> +#include <linux/freezer.h> #include <net/sock.h> #include "internal.h"
net/rxrpc/krxtimod.c +1 -0
@@ -13,6 +13,7 @@ #include <linux/module.h>#include <linux/init.h> #include <linux/sched.h> #include <linux/completion.h> +#include <linux/freezer.h> #include <rxrpc/rxrpc.h> #include <rxrpc/krxtimod.h> #include <asm/errno.h>
net/sunrpc/svcsock.c +1 -0
@@ -32,6 +32,7 @@ #include <linux/slab.h>#include <linux/netdevice.h> #include <linux/skbuff.h> #include <linux/file.h> +#include <linux/freezer.h> #include <net/sock.h> #include <net/checksum.h> #include <net/ip.h>
Hi!
Quoted 3 lines
Move process freezing functions from
include/linux/sched.htofreezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything.
Well, I'm not sure if freezer changes often enough for this to matter. ..
Patch is pretty much okay (provided it does not change any code) "is it worth the change" is up-to Andrew.
include/linux/freezer.h line 2
Quoted 5 lines
include/linux/freezer.h new file +2
-0@@ -0,0 +1,84 @@ +/* Freezer declarations */ +
Needs copyright/GPL at least.
include/linux/freezer.h line 10
Quoted 8 lines
include/linux/freezer.h new file +8
-0+#ifdef CONFIG_PM +/* +* Check if a process has been frozen +*/ +static inline int frozen (struct task_struct *p) +{ +return p->flags &PF_FROZEN ; +}
And switch it to kerneldoc while you are at it...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 1 line · Nigel Cunningham
Move process freezing functions from
include/linux/sched.htofreezer.h,
Hm, I'd rather move them to suspend.h. Is there any reason for introducing yet another header file?
Quoted 2 lines
so that modifications to the freezer or the kernel configuration don't require recompiling just about everything.
Yes, that's annoying.
Greetings,
Rafael
Hi.
Quoted 5 lines · Rafael J. Wysocki
Quoted 1 line · Nigel Cunningham
Move process freezing functions from
include/linux/sched.htofreezer.h,Hm, I'd rather move them to
suspend.h. Is there any reason for introducing yet another header file?
Suspend.h sounds reasonable. I picked freezer.h because I thought it made the purpose of the #include simple and crystal clear, and doesn't pull in other dependencies (my freezer.h depends on nothing else, where as suspend.h already depends on:
#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32) #include <asm/suspend.h>
#endif
#include <linux/swap.h>
#include <linux/notifier.h>
#include <linux/init.h>
#include <linux/pm.h>
That said, suspend.h isn't anything like sched.h itself :)
Nigel