lkml.org 
[lkml]   [2003]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all()
Date
On Fri, 21 Feb 2003, Hugh Dickins wrote:
> No. All that does is make sure that the cpu you start out on is
> flushed, once or twice, and the cpu you end up on may be missed.
> Use preempt_disable and preempt_enable.

Oh, you are right! I think I am totally stupid this morning...!
Now finally I hope this is the correct patch...

Thomas Schlichter--- linux-2.5.62/arch/i386/mm/pageattr.c.orig Fri Feb 21 13:27:59 2003
+++ linux-2.5.62/arch/i386/mm/pageattr.c Fri Feb 21 13:32:39 2003
@@ -131,10 +131,14 @@

static inline void flush_map(void)
{
-#ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
+ preempt_disable();
smp_call_function(flush_kernel_map, NULL, 1, 1);
-#endif
flush_kernel_map(NULL);
+ preempt_enable();
+#else
+ flush_kernel_map(NULL);
+#endif
}

struct deferred_page {
--- linux-2.5.62/arch/x86_64/mm/pageattr.c.orig Fri Feb 21 13:33:38 2003
+++ linux-2.5.62/arch/x86_64/mm/pageattr.c Fri Feb 21 13:34:40 2003
@@ -123,10 +123,14 @@

static inline void flush_map(unsigned long address)
{
-#ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
+ preempt_disable();
smp_call_function(flush_kernel_map, (void *)address, 1, 1);
-#endif
flush_kernel_map((void *)address);
+ preempt_enable();
+#else
+ flush_kernel_map((void *)address);
+#endif
}

struct deferred_page { [unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.062 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site