wok diff linux/stuff/linux-freeinitrd.u @ rev 20261

Up linux 3.16.55
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Mar 15 11:24:25 2018 +0100 (2018-03-15)
parents ffc20f9bd49f
children a7a9bd1b47f4
line diff
     1.1 --- a/linux/stuff/linux-freeinitrd.u	Wed Jan 10 15:30:44 2018 +0100
     1.2 +++ b/linux/stuff/linux-freeinitrd.u	Thu Mar 15 11:24:25 2018 +0100
     1.3 @@ -1,18 +1,6 @@
     1.4 ---- linux-3.2.98/arch/x86/mm/init.c
     1.5 -+++ linux-3.2.98/arch/x86/mm/init.c
     1.6 -@@ -391,7 +391,7 @@
     1.7 - 	set_memory_nx(begin, (end - begin) >> PAGE_SHIFT);
     1.8 - 	set_memory_rw(begin, (end - begin) >> PAGE_SHIFT);
     1.9 - 
    1.10 --	printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10);
    1.11 -+	if (what && *what) printk(KERN_INFO "Freeing %s: %luk freed\n", what, (end - begin) >> 10);
    1.12 - 
    1.13 - 	for (; addr < end; addr += PAGE_SIZE) {
    1.14 - 		ClearPageReserved(virt_to_page(addr));
    1.15 -
    1.16 ---- linux-3.2.14/init/initramfs.c
    1.17 -+++ linux-3.2.14/init/initramfs.c
    1.18 -@@ -374,6 +374,52 @@
    1.19 +--- linux-3.16.53/init/initramfs.c
    1.20 ++++ linux-3.16.53/init/initramfs.c
    1.21 +@@ -384,6 +384,52 @@
    1.22   	[Reset]		= do_reset,
    1.23   };
    1.24   
    1.25 @@ -65,7 +53,7 @@
    1.26   static int __init write_buffer(char *buf, unsigned len)
    1.27   {
    1.28   	count = len;
    1.29 -@@ -417,6 +463,7 @@
    1.30 +@@ -427,6 +473,7 @@
    1.31   	decompress_fn decompress;
    1.32   	const char *compress_name;
    1.33   	static __initdata char msg_buf[64];
    1.34 @@ -73,7 +61,7 @@
    1.35   
    1.36   	header_buf = kmalloc(110, GFP_KERNEL);
    1.37   	symlink_buf = kmalloc(PATH_MAX + N_ALIGN(PATH_MAX) + 1, GFP_KERNEL);
    1.38 -@@ -430,11 +477,16 @@
    1.39 +@@ -440,11 +487,16 @@
    1.40   	message = NULL;
    1.41   	while (!message && len) {
    1.42   		loff_t saved_offset = this_header;
    1.43 @@ -90,9 +78,9 @@
    1.44   			continue;
    1.45   		}
    1.46   		if (!*buf) {
    1.47 -@@ -446,7 +498,12 @@
    1.48 - 		this_header = 0;
    1.49 +@@ -457,7 +509,12 @@
    1.50   		decompress = decompress_method(buf, len, &compress_name);
    1.51 + 		pr_debug("Detected %s compressed data\n", compress_name);
    1.52   		if (decompress) {
    1.53  -			res = decompress(buf, len, NULL, flush_buffer, NULL,
    1.54  +			if (early_free_initrd) {
    1.55 @@ -104,7 +92,7 @@
    1.56   				   &my_inptr, error);
    1.57   			if (res)
    1.58   				error("decompressor failed");
    1.59 -@@ -488,7 +545,8 @@
    1.60 +@@ -499,7 +556,8 @@
    1.61   #include <linux/initrd.h>
    1.62   #include <linux/kexec.h>
    1.63   
    1.64 @@ -114,7 +102,7 @@
    1.65   {
    1.66   #ifdef CONFIG_KEXEC
    1.67   	unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
    1.68 -@@ -516,6 +574,12 @@
    1.69 +@@ -527,6 +585,12 @@
    1.70   #endif
    1.71   		free_initrd_mem(initrd_start, initrd_end);
    1.72   skip: