- dont-use-flush_tlb_all-in-suspend-time-fix.patch removed from -mm tree

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

 



The patch titled

     dont-use-flush_tlb_all-in-suspend-time-tidy fix

has been removed from the -mm tree.  Its filename is

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

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: dont-use-flush_tlb_all-in-suspend-time-tidy fix
From: Shaohua Li <shaohua.li@xxxxxxxxx>


> Could we perhaps reuse swsusp_pg_dir (just make it used for swsusp &
> suspend-to-ram) to save a bit more code? It is in arch/i386/mm/init.c

Ok, I guess this is what you want.

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  |   18 ------------------
 arch/i386/kernel/acpi/wakeup.S |    2 +-
 arch/i386/mm/init.c            |   15 ++-------------
 3 files changed, 3 insertions(+), 32 deletions(-)

diff -puN arch/i386/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time-fix arch/i386/kernel/acpi/sleep.c
--- devel/arch/i386/kernel/acpi/sleep.c~dont-use-flush_tlb_all-in-suspend-time-fix	2006-05-24 18:44:56.000000000 -0700
+++ devel-akpm/arch/i386/kernel/acpi/sleep.c	2006-05-24 18:44:56.000000000 -0700
@@ -11,30 +11,14 @@
 #include <linux/cpumask.h>
 
 #include <asm/smp.h>
-#include <asm/tlbflush.h>
 
 /* address in low memory of the wakeup routine. */
 unsigned long acpi_wakeup_address = 0;
 unsigned long acpi_video_flags;
 extern char wakeup_start, wakeup_end;
 
-extern void zap_low_mappings(void);
-
 extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
 
-static void init_low_mapping(pgd_t * pgd, int pgd_limit)
-{
-	int pgd_ofs = 0;
-
-	while ((pgd_ofs < pgd_limit)
-	       && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) {
-		set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD));
-		pgd_ofs++, pgd++;
-	}
-	WARN_ON(num_online_cpus() != 1);
-	local_flush_tlb();
-}
-
 /**
  * acpi_save_state_mem - save kernel state
  *
@@ -45,7 +29,6 @@ int acpi_save_state_mem(void)
 {
 	if (!acpi_wakeup_address)
 		return 1;
-	init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
 	memcpy((void *)acpi_wakeup_address, &wakeup_start,
 	       &wakeup_end - &wakeup_start);
 	acpi_copy_wakeup_routine(acpi_wakeup_address);
@@ -58,7 +41,6 @@ int acpi_save_state_mem(void)
  */
 void acpi_restore_state_mem(void)
 {
-	zap_low_mappings();
 }
 
 /**
diff -puN arch/i386/kernel/acpi/wakeup.S~dont-use-flush_tlb_all-in-suspend-time-fix arch/i386/kernel/acpi/wakeup.S
--- devel/arch/i386/kernel/acpi/wakeup.S~dont-use-flush_tlb_all-in-suspend-time-fix	2006-05-24 18:44:56.000000000 -0700
+++ devel-akpm/arch/i386/kernel/acpi/wakeup.S	2006-05-24 18:44:56.000000000 -0700
@@ -56,7 +56,7 @@ wakeup_code:
 1:
 
 	# set up page table
-	movl	$swapper_pg_dir-__PAGE_OFFSET, %eax
+	movl	$swsusp_pg_dir-__PAGE_OFFSET, %eax
 	movl	%eax, %cr3
 
 	testl	$1, real_efer_save_restore - wakeup_code
diff -puN arch/i386/mm/init.c~dont-use-flush_tlb_all-in-suspend-time-fix arch/i386/mm/init.c
--- devel/arch/i386/mm/init.c~dont-use-flush_tlb_all-in-suspend-time-fix	2006-05-24 18:44:56.000000000 -0700
+++ devel-akpm/arch/i386/mm/init.c	2006-05-24 18:44:56.000000000 -0700
@@ -385,7 +385,7 @@ static void __init pagetable_init (void)
 #endif
 }
 
-#ifdef CONFIG_SOFTWARE_SUSPEND
+#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP)
 /*
  * Swap suspend & friends need this for resume because things like the intel-agp
  * driver might have split up a kernel 4MB mapping.
@@ -421,18 +421,7 @@ void zap_low_mappings (void)
 #else
 		set_pgd(swapper_pg_dir+i, __pgd(0));
 #endif
-	/*
-	 * We can be called at suspend/resume time, with local interrupts
-	 * disabled.  But flush_tlb_all() requires that local interrupts be
-	 * enabled.
-	 *
-	 * Happily, the APs are not yet started, so we can use local_flush_tlb()
-	 * in that case
-	 */
-	if (num_online_cpus() == 1)
-		local_flush_tlb();
-	else
-		flush_tlb_all();
+	flush_tlb_all();
 }
 
 static int disable_nx __initdata = 0;
_

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

git-acpi.patch
allow-msi-to-work-on-kexec-kernel.patch
x86-cpu_init-avoid-gfp_kernel-allocation-while-atomic.patch
swsusp-add-architecture-special-saveable-pages-support.patch
swsusp-i386-mark-special-saveable-unsaveable-pages.patch
swsusp-x86_64-mark-special-saveable-unsaveable-pages.patch
dont-use-flush_tlb_all-in-suspend-time.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