Author: baggins Date: Wed Dec 31 15:58:54 2008 GMT Module: SOURCES Tag: LINUX_2_6 ---- Log message: current-tuxonice-for-2.6.28.patch.bz2 27-Dec-2008 08:25 113K
---- Files affected: SOURCES: linux-2.6-suspend2.patch (1.1.2.2.2.11 -> 1.1.2.2.2.12) ---- Diffs: ================================================================ Index: SOURCES/linux-2.6-suspend2.patch diff -u SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.11 SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.12 --- SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.11 Thu Dec 25 22:50:51 2008 +++ SOURCES/linux-2.6-suspend2.patch Wed Dec 31 16:58:48 2008 @@ -1235,10 +1235,10 @@ + testing. His efforts have contributed as much to TuxOnIce as any of the + names above. diff --git a/MAINTAINERS b/MAINTAINERS -index 3596d17..3e7e5ce 100644 +index fbc8fa5..b2b74f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -4100,6 +4100,13 @@ P: Maciej W. Rozycki +@@ -4233,6 +4233,13 @@ P: Maciej W. Rozycki M: [email protected] S: Maintained @@ -1252,13 +1252,90 @@ U14-34F SCSI DRIVER P: Dario Ballabio M: [email protected] +diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c +index cc5a254..1216ab3 100644 +--- a/arch/x86/kernel/reboot.c ++++ b/arch/x86/kernel/reboot.c +@@ -511,6 +511,7 @@ void machine_restart(char *cmd) + { + machine_ops.restart(cmd); + } ++EXPORT_SYMBOL_GPL(machine_restart); + + void machine_halt(void) + { +diff --git a/arch/x86/power/cpu_64.c b/arch/x86/power/cpu_64.c +index e3b6cf7..bdd74a8 100644 +--- a/arch/x86/power/cpu_64.c ++++ b/arch/x86/power/cpu_64.c +@@ -10,6 +10,7 @@ + + #include <linux/smp.h> + #include <linux/suspend.h> ++#include <linux/module.h> + #include <asm/proto.h> + #include <asm/page.h> + #include <asm/pgtable.h> +@@ -76,6 +77,7 @@ void save_processor_state(void) + { + __save_processor_state(&saved_context); + } ++EXPORT_SYMBOL_GPL(save_processor_state); + + static void do_fpu_end(void) + { +diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c +index 81197c6..ff7e534 100644 +--- a/arch/x86/power/hibernate_32.c ++++ b/arch/x86/power/hibernate_32.c +@@ -8,6 +8,7 @@ + + #include <linux/suspend.h> + #include <linux/bootmem.h> ++#include <linux/module.h> + + #include <asm/system.h> + #include <asm/page.h> +@@ -163,6 +164,7 @@ int swsusp_arch_resume(void) + restore_image(); + return 0; + } ++EXPORT_SYMBOL_GPL(swsusp_arch_resume); + + /* + * pfn_is_nosave - check if given pfn is in the 'nosave' section +diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c +index 6dd000d..b42e72a 100644 +--- a/arch/x86/power/hibernate_64.c ++++ b/arch/x86/power/hibernate_64.c +@@ -10,6 +10,7 @@ + + #include <linux/smp.h> + #include <linux/suspend.h> ++#include <linux/module.h> + #include <asm/proto.h> + #include <asm/page.h> + #include <asm/pgtable.h> +@@ -117,6 +118,7 @@ int swsusp_arch_resume(void) + restore_image(); + return 0; + } ++EXPORT_SYMBOL_GPL(swsusp_arch_resume); + + /* + * pfn_is_nosave - check if given pfn is in the 'nosave' section +@@ -167,3 +169,4 @@ int arch_hibernation_header_restore(void *addr) + restore_cr3 = rdr->cr3; + return (rdr->magic == RESTORE_MAGIC) ? 0 : -EINVAL; + } ++EXPORT_SYMBOL_GPL(arch_hibernation_header_restore); diff --git a/crypto/Kconfig b/crypto/Kconfig -index d831859..59dbd07 100644 +index dc20a34..3d00017 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig -@@ -666,6 +666,14 @@ config CRYPTO_LZO +@@ -287,6 +287,14 @@ config CRYPTO_MD5 help - This is the LZO algorithm. + MD5 message digest algorithm (RFC1321). +config CRYPTO_LZF + tristate "LZF compression algorithm" @@ -1268,31 +1345,31 @@ + This is the LZF algorithm. It is especially useful for TuxOnIce, + because it achieves good compression quickly. + - source "drivers/crypto/Kconfig" - - endif # if CRYPTO + config CRYPTO_MICHAEL_MIC + tristate "Michael MIC keyed digest algorithm" + select CRYPTO_ALGAPI diff --git a/crypto/Makefile b/crypto/Makefile -index d4f3ed8..fe05a9e 100644 +index cd4a4ed..800eced 100644 --- a/crypto/Makefile +++ b/crypto/Makefile -@@ -67,6 +67,7 @@ obj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o +@@ -71,6 +71,7 @@ obj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o +obj-$(CONFIG_CRYPTO_LZF) += lzf.o obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o obj-$(CONFIG_CRYPTO_LZO) += lzo.o - + obj-$(CONFIG_CRYPTO_RNG2) += rng.o diff --git a/crypto/lzf.c b/crypto/lzf.c new file mode 100644 -index 0000000..3e0aa8c +index 0000000..ccaf83a --- /dev/null +++ b/crypto/lzf.c @@ -0,0 +1,326 @@ +/* + * Cryptoapi LZF compression module. + * -+ * Copyright (c) 2004-2005 Nigel Cunningham <nigel at tuxonice net> ++ * Copyright (c) 2004-2008 Nigel Cunningham <nigel at tuxonice net> + * + * based on the deflate.c file: + * @@ -1349,7 +1426,7 @@ +#include <linux/crypto.h> +#include <linux/err.h> +#include <linux/vmalloc.h> -+#include <asm/string.h> ++#include <linux/string.h> + +struct lzf_ctx { + void *hbuf; @@ -1467,9 +1544,9 @@ + unsigned int maxlen = in_end - ip - len; + maxlen = maxlen > max_ref ? max_ref : maxlen; + -+ do ++ do { + len++; -+ while (len < maxlen && ref[len] == ip[len]); ++ } while (len < maxlen && ref[len] == ip[len]); + + if (op + lit + 1 + 3 >= out_end) { + *out_len = PAGE_SIZE; @@ -1616,59 +1693,116 @@ +MODULE_DESCRIPTION("LZF Compression Algorithm"); +MODULE_AUTHOR("Marc Alexander Lehmann & Nigel Cunningham"); diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c -index 273a944..37c1e9f 100644 +index 692c20b..a39a294 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c -@@ -54,6 +54,7 @@ void device_pm_lock(void) +@@ -23,6 +23,7 @@ + #include <linux/pm.h> + #include <linux/resume-trace.h> + #include <linux/rwsem.h> ++#include <linux/suspend.h> + + #include "../base.h" + #include "power.h" +@@ -54,6 +55,7 @@ void device_pm_lock(void) { mutex_lock(&dpm_list_mtx); } -+EXPORT_SYMBOL(device_pm_lock); ++EXPORT_SYMBOL_GPL(device_pm_lock); /** * device_pm_unlock - unlock the list of active devices used by the PM core -@@ -62,6 +63,7 @@ void device_pm_unlock(void) +@@ -62,6 +64,7 @@ void device_pm_unlock(void) { mutex_unlock(&dpm_list_mtx); } -+EXPORT_SYMBOL(device_pm_unlock); ++EXPORT_SYMBOL_GPL(device_pm_unlock); /** * device_pm_add - add a device to the list of active devices -diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c -index d524dc2..681972e 100644 ---- a/drivers/macintosh/via-pmu.c -+++ b/drivers/macintosh/via-pmu.c -@@ -40,7 +40,6 @@ - #include <linux/interrupt.h> - #include <linux/device.h> - #include <linux/sysdev.h> --#include <linux/freezer.h> - #include <linux/syscalls.h> - #include <linux/suspend.h> - #include <linux/cpu.h> +diff --git a/drivers/char/vt.c b/drivers/char/vt.c +index 008176e..7d67569 100644 +--- a/drivers/char/vt.c ++++ b/drivers/char/vt.c +@@ -187,6 +187,7 @@ int fg_console; + int last_console; + int want_console = -1; + int kmsg_redirect; ++EXPORT_SYMBOL_GPL(kmsg_redirect); + + /* + * For each existing display, we have a pointer to console currently visible diff --git a/drivers/md/md.c b/drivers/md/md.c -index deeac4b..cbf1e49 100644 +index 1b1d326..84b843a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c -@@ -5899,6 +5899,8 @@ void md_do_sync(mddev_t *mddev) +@@ -5591,7 +5591,6 @@ void md_done_sync(mddev_t *mddev, int blocks, int ok) + } + } + +- + /* md_write_start(mddev, bi) + * If we need to update some array metadata (e.g. 'active' flag + * in superblock) before writing, schedule a superblock update +@@ -5736,6 +5735,9 @@ void md_do_sync(mddev_t *mddev) + mddev->curr_resync = 2; + + try_again: ++ while (freezer_is_on()) ++ yield(); ++ + if (kthread_should_stop()) { + set_bit(MD_RECOVERY_INTR, &mddev->recovery); + goto skip; +@@ -5757,6 +5759,10 @@ void md_do_sync(mddev_t *mddev) + * time 'round when curr_resync == 2 + */ + continue; ++ ++ while (freezer_is_on()) ++ yield(); ++ + /* We need to wait 'interruptible' so as not to + * contribute to the load average, and not to + * be caught by 'softlockup' +@@ -5769,6 +5775,7 @@ void md_do_sync(mddev_t *mddev) + " share one or more physical units)\n", + desc, mdname(mddev), mdname(mddev2)); + mddev_put(mddev2); ++ try_to_freeze(); + if (signal_pending(current)) + flush_signals(current); + schedule(); +@@ -5852,6 +5859,10 @@ void md_do_sync(mddev_t *mddev) + mddev->resync_max > j + || kthread_should_stop()); + } ++ ++ while (freezer_is_on()) ++ yield(); ++ + if (kthread_should_stop()) + goto interrupted; + sectors = mddev->pers->sync_request(mddev, j, &skipped, +@@ -5895,6 +5906,9 @@ void md_do_sync(mddev_t *mddev) last_mark = next; } + while (freezer_is_on()) + yield(); ++ if (kthread_should_stop()) goto interrupted; diff --git a/fs/buffer.c b/fs/buffer.c -index ac78d4c..3a927e2 100644 +index 10179cf..e892125 100644 --- a/fs/buffer.c +++ b/fs/buffer.c -@@ -247,6 +247,91 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb) +@@ -246,6 +246,93 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb) } EXPORT_SYMBOL(thaw_bdev); -+#if 0 ++#ifdef CONFIG_FS_FREEZER_DEBUG +#define FS_PRINTK(fmt, args...) printk(fmt, ## args) +#else +#define FS_PRINTK(fmt, args...) @@ -1679,6 +1813,7 @@ +/** + * freeze_filesystems - lock all filesystems and force them into a consistent + * state ++ * @which: What combination of fuse & non-fuse to freeze. + */ +void freeze_filesystems(int which) +{ @@ -1701,7 +1836,7 @@ + which & FS_FREEZER_FUSE) { + sb->s_frozen = SB_FREEZE_TRANS; + sb->s_flags |= MS_FROZEN; -+ printk("Fuse filesystem done.\n"); ++ FS_PRINTK("Fuse filesystem done.\n"); + continue; + } + @@ -1725,6 +1860,7 @@ + +/** + * thaw_filesystems - unlock all filesystems ++ * @which: What combination of fuse & non-fuse to thaw. + */ +void thaw_filesystems(int which) +{ @@ -1757,10 +1893,18 @@ * Various filesystems appear to want __find_get_block to be non-blocking. * But it's the page lock which protects the buffers. To get around this, diff --git a/fs/drop_caches.c b/fs/drop_caches.c -index 3e5637f..0d4c88e 100644 +index 3e5637f..f3c5cd6 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c -@@ -33,7 +33,7 @@ static void drop_pagecache_sb(struct super_block *sb) +@@ -8,6 +8,7 @@ + #include <linux/writeback.h> + #include <linux/sysctl.h> + #include <linux/gfp.h> ++#include <linux/module.h> + + /* A global variable is a bit ugly, but it keeps the code simple */ + int sysctl_drop_caches; +@@ -33,7 +34,7 @@ static void drop_pagecache_sb(struct super_block *sb) iput(toput_inode); } @@ -1769,6 +1913,14 @@ { struct super_block *sb; +@@ -61,6 +62,7 @@ static void drop_slab(void) + nr_objects = shrink_slab(1000, GFP_KERNEL, 1000); + } while (nr_objects > 10); + } ++EXPORT_SYMBOL_GPL(drop_pagecache); + + int drop_caches_sysctl_handler(ctl_table *table, int write, + struct file *file, void __user *buffer, size_t *length, loff_t *ppos) diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 4f3cab3..f15b0c5 100644 --- a/fs/fuse/control.c @@ -1782,7 +1934,7 @@ .kill_sb = fuse_ctl_kill_sb, }; diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c -index 87250b6..7246e3d 100644 +index b723614..ef5d259 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -7,6 +7,7 @@ @@ -1821,7 +1973,7 @@ if (nbytes < sizeof(struct fuse_out_header)) return -EINVAL; diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c -index fd03330..347e054 100644 +index fd03330..85fec3a 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -7,12 +7,14 @@ @@ -1849,16 +2001,25 @@ req = fuse_get_req(fc); if (IS_ERR(req)) return 0; -@@ -273,6 +278,8 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name, - if (IS_ERR(req)) +@@ -268,6 +273,8 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name, + if (name->len > FUSE_NAME_MAX) goto out; -+ FUSE_MIGHT_FREEZE(sb, "fuse_lookup"); ++ FUSE_MIGHT_FREEZE(sb, "fuse_lookup_name"); + - forget_req = fuse_get_req(fc); - err = PTR_ERR(forget_req); - if (IS_ERR(forget_req)) { -@@ -402,6 +409,8 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, + req = fuse_get_req(fc); + err = PTR_ERR(req); + if (IS_ERR(req)) +@@ -331,6 +338,8 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, + if (err) + goto out_err; + ++ FUSE_MIGHT_FREEZE(dir->i_sb, "fuse_lookup"); ++ + err = -EIO; + if (inode && get_node_id(inode) == FUSE_ROOT_ID) + goto out_iput; +@@ -402,6 +411,8 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, if (IS_ERR(forget_req)) return PTR_ERR(forget_req); @@ -1867,7 +2028,7 @@ req = fuse_get_req(fc); err = PTR_ERR(req); if (IS_ERR(req)) -@@ -488,6 +497,8 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, +@@ -488,6 +499,8 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, int err; struct fuse_req *forget_req; @@ -1876,7 +2037,7 @@ forget_req = fuse_get_req(fc); if (IS_ERR(forget_req)) { fuse_put_request(fc, req); -@@ -585,7 +596,11 @@ static int fuse_mkdir(struct inode *dir, struct dentry *entry, int mode) +@@ -585,7 +598,11 @@ static int fuse_mkdir(struct inode *dir, struct dentry *entry, int mode) { struct fuse_mkdir_in inarg; struct fuse_conn *fc = get_fuse_conn(dir); @@ -1889,7 +2050,7 @@ if (IS_ERR(req)) return PTR_ERR(req); -@@ -605,7 +620,11 @@ static int fuse_symlink(struct inode *dir, struct dentry *entry, +@@ -605,7 +622,11 @@ static int fuse_symlink(struct inode *dir, struct dentry *entry, { struct fuse_conn *fc = get_fuse_conn(dir); unsigned len = strlen(link) + 1; @@ -1902,7 +2063,7 @@ if (IS_ERR(req)) return PTR_ERR(req); -@@ -622,7 +641,11 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) +@@ -622,7 +643,11 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) { int err; struct fuse_conn *fc = get_fuse_conn(dir); @@ -1915,7 +2076,7 @@ if (IS_ERR(req)) return PTR_ERR(req); -@@ -653,7 +676,11 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry) +@@ -653,7 +678,11 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry) { int err; struct fuse_conn *fc = get_fuse_conn(dir); @@ -1929,7 +2090,7 @@ return PTR_ERR(req); diff --git a/fs/fuse/file.c b/fs/fuse/file.c -index 2bada6b..2e4af49 100644 +index 34930a9..57414f5 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -7,11 +7,13 @@ @@ -1955,16 +2116,71 @@ req = fuse_get_req(fc); if (IS_ERR(req)) return PTR_ERR(req); -@@ -674,6 +678,8 @@ static int fuse_buffered_write(struct file *file, struct inode *inode, +@@ -270,6 +274,8 @@ static int fuse_flush(struct file *file, fl_owner_t id) + if (fc->no_flush) + return 0; + ++ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_flush"); ++ + req = fuse_get_req_nofail(fc, file); + memset(&inarg, 0, sizeof(inarg)); + inarg.fh = ff->fh; +@@ -321,6 +327,8 @@ int fuse_fsync_common(struct file *file, struct dentry *de, int datasync, + if ((!isdir && fc->no_fsync) || (isdir && fc->no_fsyncdir)) + return 0; + ++ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_fsync_common"); ++ + /* + * Start writeback against all dirty pages of the inode, then + * wait for all outstanding writes, before sending the FSYNC +@@ -429,6 +437,8 @@ static int fuse_readpage(struct file *file, struct page *page) + if (is_bad_inode(inode)) + goto out; + ++ FUSE_MIGHT_FREEZE(file->f_mapping->host->i_sb, "fuse_readpage"); ++ + /* + * Page writeback can extend beyond the liftime of the + * page-cache page, so make sure we read a properly synced +@@ -529,6 +539,9 @@ static int fuse_readpages_fill(void *_data, struct page *page) + struct inode *inode = data->inode; + struct fuse_conn *fc = get_fuse_conn(inode); + ++ FUSE_MIGHT_FREEZE(data->file->f_mapping->host->i_sb, ++ "fuse_readpages_fill"); ++ + fuse_wait_on_page_writeback(inode, page->index); + + if (req->num_pages && +@@ -559,6 +572,8 @@ static int fuse_readpages(struct file *file, struct address_space *mapping, + if (is_bad_inode(inode)) + goto out; + ++ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_readpages"); ++ + data.file = file; + data.inode = inode; + data.req = fuse_get_req(fc); +@@ -676,6 +691,8 @@ static int fuse_buffered_write(struct file *file, struct inode *inode, if (is_bad_inode(inode)) return -EIO; -+ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_commit_write"); ++ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_buffered_write"); + /* * Make sure writepages on the same page are not mixed up with * plain writes. -@@ -962,6 +968,8 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf, +@@ -830,6 +847,8 @@ static ssize_t fuse_perform_write(struct file *file, + struct fuse_req *req; + ssize_t count; + ++ FUSE_MIGHT_FREEZE(inode->i_sb, "fuse_perform_write"); ++ + req = fuse_get_req(fc); + if (IS_ERR(req)) { + err = PTR_ERR(req); +@@ -964,6 +983,8 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf, if (is_bad_inode(inode)) return -EIO; @@ -1973,7 +2189,7 @@ req = fuse_get_req(fc); if (IS_ERR(req)) return PTR_ERR(req); -@@ -1315,6 +1323,8 @@ static int fuse_getlk(struct file *file, struct file_lock *fl) +@@ -1317,6 +1338,8 @@ static int fuse_getlk(struct file *file, struct file_lock *fl) struct fuse_lk_out outarg; int err; @@ -1982,7 +2198,7 @@ req = fuse_get_req(fc); if (IS_ERR(req)) return PTR_ERR(req); -@@ -1350,6 +1360,8 @@ static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) +@@ -1352,6 +1375,8 @@ static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) if (fl->fl_flags & FL_CLOSE) return 0; @@ -1991,7 +2207,7 @@ req = fuse_get_req(fc); if (IS_ERR(req)) return PTR_ERR(req); -@@ -1416,6 +1428,8 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block) +@@ -1418,6 +1443,8 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block) if (!inode->i_sb->s_bdev || fc->no_bmap) return 0; @@ -2020,10 +2236,10 @@ + } \ +} while (0) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c -index d2249f1..04ae6cb 100644 +index 2e99f34..ad8d103 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c -@@ -914,7 +914,7 @@ static int fuse_get_sb(struct file_system_type *fs_type, +@@ -908,7 +908,7 @@ static int fuse_get_sb(struct file_system_type *fs_type, static struct file_system_type fuse_fs_type = { .owner = THIS_MODULE, .name = "fuse", @@ -2032,7 +2248,7 @@ .get_sb = fuse_get_sb, .kill_sb = kill_anon_super, }; <<Diff was trimmed, longer than 597 lines>> ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-2.6-suspend2.patch?r1=1.1.2.2.2.11&r2=1.1.2.2.2.12&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
