Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932066AbVKWQjR (ORCPT ); Wed, 23 Nov 2005 11:39:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932069AbVKWQjQ (ORCPT ); Wed, 23 Nov 2005 11:39:16 -0500 Received: from ns2.suse.de ([195.135.220.15]:53995 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S932066AbVKWQjP (ORCPT ); Wed, 23 Nov 2005 11:39:15 -0500 Date: Wed, 23 Nov 2005 17:39:06 +0100 From: Andi Kleen To: Alan Cox Cc: Andi Kleen , Gerd Knorr , Linus Torvalds , Dave Jones , Zachary Amsden , Pavel Machek , Andrew Morton , Linux Kernel Mailing List , "H. Peter Anvin" , Zwane Mwaikambo , Pratap Subrahmanyam , Christopher Li , "Eric W. Biederman" , Ingo Molnar Subject: Re: [patch] SMP alternatives Message-ID: <20051123163906.GF20775@brahms.suse.de> References: <4378A7F3.9070704@suse.de> <4379ECC1.20005@suse.de> <437A0649.7010702@suse.de> <437B5A83.8090808@suse.de> <438359D7.7090308@suse.de> <1132764133.7268.51.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1132764133.7268.51.camel@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 29 On Wed, Nov 23, 2005 at 04:42:13PM +0000, Alan Cox wrote: > On Mer, 2005-11-23 at 12:17 -0700, Andi Kleen wrote: > > > + /* Paranoia */ > > > + asm volatile ("jmp 1f\n1:"); > > > + mb(); > > > > That would be totally obsolete 386 era paranoia. If anything then use > > a CLFLUSH (but not available on all x86s) > > If you are patching code another x86 CPU is running you must halt the > other processors and ensure it executes a serialzing instruction before > it enters any patched code. Yes that is why the original alternative() mechanism always only runs before the code is ever executed. > How many kilobytes of tables do you add to the kernel to do this > pointless stunt btw ? I much prefer the MSR bit too. Unfortunately it doesn't exist (or rather I bet it exists somewhere, just undocumented) on Intel systems. -Andi - 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/