Received: by 10.213.65.68 with SMTP id h4csp3562914imn; Tue, 3 Apr 2018 07:09:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx48odh6/0SOlsHs11ARRjOOXrXNMvkH7FAnDj1vVJ+EBA2Xz0qqLuivq2qNLghccDPMrhtNB X-Received: by 2002:a17:902:227:: with SMTP id 36-v6mr13944534plc.134.1522764551126; Tue, 03 Apr 2018 07:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522764551; cv=none; d=google.com; s=arc-20160816; b=Hl2i7/vlhpeRSN/2FtroUEEjXLOwpnzHHfnR6Msz3SujNvFbR3L/PZ5KYgQRAUzvS8 J5AJitnbNJxjLZhLuBYgY8UHh3XCMZ7LAwN54HD9yR4PoXY5nDWm7TNn7NL89/kAgQ7W K2I73YXpIKt4KdmtXTRkMnWLMDwlOja0ue704bTn3lvHJ47tjYTL97t4A6l/1XBgk7bC BsdzpRBfOLxQSlxOhPDQ2DRNCD7au76h38x7HethIMwlrY1ZgltnWQM74RGOCTotgUxN sQpYebiEx5Cs5oiws4TCmGAMN7yEomKQlqzvmpYA85mmtP3e7gxybbTz6KjipmkxoayY GWBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=lPePai3CG4W/sFenwUG4uxHhhki60lmucdaElgeMiFE=; b=gnbqxZW0NYzXlPsa/UUzicfkP9duXgrfcuef+huYq7chm2eEhDP498nyG8xNM/RShr wCnFfs/U13y+GzGPvyrXaIuruvesDpabYqD0RnI5JuZnNwcVGAKVMzoFKz+vzE+sWiO4 FfjC53kMFboz2qfgsDYE+FUdbYcasS6nmA5aH6fap8aW387xomcLcC3Nt3K5g/tqNQ3b QxdfZ/xjA2jkkUHo301TcV8+Uh/HUKYq/X/r4P9nQpjUN900M/n/iSWwC4fTmdnZJ7Sn a0bDvMr9xD4x5fsDXa39EXJMWs27+QBVFsBsFMxIFiObUplK+5bRo6mZKTh/j6iwO6Uz UOZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dkH9rsro; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9-v6si610142plt.438.2018.04.03.07.08.56; Tue, 03 Apr 2018 07:09:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dkH9rsro; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751332AbeDCOHZ (ORCPT + 99 others); Tue, 3 Apr 2018 10:07:25 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:55627 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbeDCOHY (ORCPT ); Tue, 3 Apr 2018 10:07:24 -0400 Received: by mail-wm0-f52.google.com with SMTP id b127so33214667wmf.5 for ; Tue, 03 Apr 2018 07:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lPePai3CG4W/sFenwUG4uxHhhki60lmucdaElgeMiFE=; b=dkH9rsroO4lEQGbqpLCNJCalXmjQJcobmnu1BgdUG/m9XQBcpDleqGhKCAaqc046qD wsUoqzr3SiqHW03vbde3OmOk8w/BcYS5nKger5Tam1r+HKWfFlP/IMq0nbJ6GTptz44S m0qBdpt2N5MoxsKzqpCyrAYpYdrIBQIzaD7po= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lPePai3CG4W/sFenwUG4uxHhhki60lmucdaElgeMiFE=; b=k9HrjESDkaZfr6scyulOiUSVvIOALFbXBRSWhM3lwSIF+Lk+6z98E0+3U4WdNEeO7V R9DH3a5eBbZ1RgJjiGkoD9oYMTirx9C0Xv4r38xff2BxcRF3Yx2Q5zGNw0CJcVWIpigW 8YAXgfJVKqyi+EMxKXVUY5Ts+8SA6utMktrvRv7/rX0Uy3uq6sSmwIzCktUTYyoPj4K+ CTM/ffjlG+ove16S4WFCziNU2SeDcZuDHxin2i1zMSf3EIuPbEJtApdkaZV2BIlgWgmg 8YUcmwOV6VZrAr81o7GEHTi82IQBQCPMzQwyVMNVtPbdJ62WgehtDE2Bq9qAI7vKkJET 4abA== X-Gm-Message-State: ALQs6tDFUpXWMqMDKEK/27Y1u+Ot/Gl8jldY37vtp+Ba6GbuMW3lsc1+ Cng4Cnzx7ErKRc03cHBCK2HUcQ== X-Received: by 10.28.148.129 with SMTP id w123mr1838879wmd.116.1522764443362; Tue, 03 Apr 2018 07:07:23 -0700 (PDT) Received: from andrea ([213.209.242.222]) by smtp.gmail.com with ESMTPSA id r126sm1228593wmb.10.2018.04.03.07.07.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 07:07:22 -0700 (PDT) Date: Tue, 3 Apr 2018 16:07:15 +0200 From: Andrea Parri To: David Howells Cc: paulmck@linux.vnet.ibm.com, Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Andrea Parri , Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , Jade Alglave , Luc Maranget , Akira Yokosawa Subject: Re: [PATCH v2 1/3] locking: Document the semantics of spin_is_locked() Message-ID: <20180403140715.GA5375@andrea> References: <20180403133543.GA26653@andrea> <1522600912-6208-2-git-send-email-andrea.parri@amarulasolutions.com> <1522600912-6208-1-git-send-email-andrea.parri@amarulasolutions.com> <29562.1522759749@warthog.procyon.org.uk> <13191.1522763553@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13191.1522763553@warthog.procyon.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 03, 2018 at 02:52:33PM +0100, David Howells wrote: > Andrea Parri wrote: > > > > It's more complicated than that. This function is dangerous and should be > > > used with extreme care. In the case where CONFIG_SMP=n the value is locked > > > one way or the other and it might be the wrong way. > > > > You mean "unlocked"? (aka, return 0) > > No, I mean "fixed", sorry. We've had problems stemming from this before on UP > systems. Sorry, but I don't understand your objection: are you suggesting to add something like "Always return 0 on !SMP" to the comment? what else? Andrea > > David