From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 21 Feb 2003 08:58:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 21 Feb 2003 08:58:26 -0500 Received: from noodles.codemonkey.org.uk ([213.152.47.19]:62909 "EHLO noodles.internal") by vger.kernel.org with ESMTP id ; Fri, 21 Feb 2003 08:58:25 -0500 Date: Fri, 21 Feb 2003 14:20:39 +0000 From: Dave Jones To: Thomas Schlichter Cc: Hugh Dickins , Andrew Morton , Linux Kernel Subject: Re: [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all() Message-ID: <20030221142039.GA21532@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Thomas Schlichter , Hugh Dickins , Andrew Morton , Linux Kernel References: <200302211342.19007.schlicht@uni-mannheim.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302211342.19007.schlicht@uni-mannheim.de> User-Agent: Mutt/1.5.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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