Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 21 Feb 2003 09:40:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 21 Feb 2003 09:40:55 -0500 Received: from bay-bridge.veritas.com ([143.127.3.10]:54145 "EHLO mtvmime01.veritas.com") by vger.kernel.org with ESMTP id ; Fri, 21 Feb 2003 09:40:53 -0500 Date: Fri, 21 Feb 2003 14:52:38 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: Dave Jones cc: Thomas Schlichter , Andrew Morton , Linux Kernel Subject: Re: [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all() In-Reply-To: <20030221142039.GA21532@codemonkey.org.uk> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 26 On Fri, 21 Feb 2003, Dave Jones wrote: > 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 > } Of course that's much much better. But I think rather better as static inline void on_each_cpu(void (*func) (void *info), void *info) passing info to func instead of assuming NULL. inline? maybe. Hugh - 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/