Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 10 Jan 2003 06:37:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 10 Jan 2003 06:37:10 -0500 Received: from holomorphy.com ([66.224.33.161]:31896 "EHLO holomorphy") by vger.kernel.org with ESMTP id ; Fri, 10 Jan 2003 06:37:10 -0500 Date: Fri, 10 Jan 2003 03:45:46 -0800 From: William Lee Irwin III To: Maciej Soltysiak Cc: linux-kernel@vger.kernel.org Subject: Re: spin_locks without smp. Message-ID: <20030110114546.GN23814@holomorphy.com> Mail-Followup-To: William Lee Irwin III , Maciej Soltysiak , linux-kernel@vger.kernel.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i Organization: The Domain of Holomorphy Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 712 Lines: 21 On Fri, Jan 10, 2003 at 12:42:34PM +0100, Maciej Soltysiak wrote: > while browsing through the network drivers about the etherleak issue i > found that some drivers have: > #ifdef CONFIG_SMP > spin_lock_irqsave(...) > #endif > and some just: > spin_lock_irqsave(...) > or similar. > Which version should be practiced? i thought spinlocks are irrelevant > without SMP so we should use #ifdef to shorten the execution path. Buggy on preempt. Remove the #ifdef Bill - 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/