lkml.org 
[lkml]   [2003]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all()
On Fri, Feb 21, 2003 at 01:42:12PM +0100, Thomas Schlichter 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...

That would appear to do what you want, but its an ugly construct to
be repeating everywhere that wants to call a function on all CPUs.
It would probably clean things up a lot if we had a function to do..

static inline void on_each_cpu(void *func)
{
#ifdef CONFIG_SMP
preempt_disable();
smp_call_function(func, NULL, 1, 1);
func(NULL);
preempt_enable();
#else
func(NULL);
#endif
}

Bluesmoke and agpgart could both use this to cleanup some mess,
and no doubt there are others

Comments?

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.083 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site