+ dont-use-flush_tlb_all-in-suspend-time.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     don't use flush_tlb_all in suspend time

has been added to the -mm tree.  Its filename is

     dont-use-flush_tlb_all-in-suspend-time.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Shaohua Li <shaohua.li@xxxxxxxxx>

flush_tlb_all uses on_each_cpu, which will disable/enable interrupt.
In suspend/resume time, this will make interrupt wrongly enabled.

Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx>
Cc: Pavel Machek <pavel@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/acpi/sleep.c   |    2 +-
 arch/i386/mm/init.c             |    5 ++++-
 arch/x86_64/kernel/acpi/sleep.c |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff -puN arch/i386/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time arch/i386/kernel/acpi/sleep.c
--- devel/arch/i386/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time	2006-04-29 23:52:55.000000000 -0700
+++ devel-akpm/arch/i386/kernel/acpi/sleep.c	2006-04-29 23:57:47.000000000 -0700
@@ -29,7 +29,7 @@ static void init_low_mapping(pgd_t * pgd
 		set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD));
 		pgd_ofs++, pgd++;
 	}
-	flush_tlb_all();
+	local_flush_tlb();
 }
 
 /**
diff -puN arch/i386/mm/init.c~dont-use-flush_tlb_all-in-suspend-time arch/i386/mm/init.c
--- devel/arch/i386/mm/init.c~dont-use-flush_tlb_all-in-suspend-time	2006-04-29 23:52:55.000000000 -0700
+++ devel-akpm/arch/i386/mm/init.c	2006-04-29 23:57:47.000000000 -0700
@@ -420,7 +420,10 @@ void zap_low_mappings (void)
 #else
 		set_pgd(swapper_pg_dir+i, __pgd(0));
 #endif
-	flush_tlb_all();
+	if (cpus_weight(cpu_online_map) == 1)
+		local_flush_tlb();
+	else
+		flush_tlb_all();
 }
 
 static int disable_nx __initdata = 0;
diff -puN arch/x86_64/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time arch/x86_64/kernel/acpi/sleep.c
--- devel/arch/x86_64/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time	2006-04-29 23:52:55.000000000 -0700
+++ devel-akpm/arch/x86_64/kernel/acpi/sleep.c	2006-04-29 23:57:47.000000000 -0700
@@ -66,7 +66,7 @@ static void init_low_mapping(void)
 	pgd_t *slot0 = pgd_offset(current->mm, 0UL);
 	low_ptr = *slot0;
 	set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET));
-	flush_tlb_all();
+	local_flush_tlb();
 }
 
 /**
@@ -92,7 +92,7 @@ int acpi_save_state_mem(void)
 void acpi_restore_state_mem(void)
 {
 	set_pgd(pgd_offset(current->mm, 0UL), low_ptr);
-	flush_tlb_all();
+	local_flush_tlb();
 }
 
 /**
_

Patches currently in -mm which might be from shaohua.li@xxxxxxxxx are

dont-use-flush_tlb_all-in-suspend-time.patch
dont-use-flush_tlb_all-in-suspend-time-tidy.patch
git-acpi.patch
x86-cpu_init-avoid-gfp_kernel-allocation-while-atomic.patch
swsusp-add-architecture-special-saveable-pages-support.patch
swsusp-add-architecture-special-saveable-pages-fix.patch
swsusp-i386-mark-special-saveable-unsaveable-pages.patch
swsusp-i386-mark-special-saveable-unsaveable-pages-fix.patch
swsusp-x86_64-mark-special-saveable-unsaveable-pages.patch
swsusp-x86_64-mark-special-saveable-unsaveable-pages-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux