Received: by 10.192.165.148 with SMTP id m20csp2920205imm; Mon, 7 May 2018 03:36:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqKsCl971ODSJ/L4qBGJE0Wot/hvqAC4uoJFQaMiCVZnJEKicGIvlF1SQ/FmIDCq/iRz+rg X-Received: by 10.98.11.210 with SMTP id 79mr36208558pfl.4.1525689388023; Mon, 07 May 2018 03:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525689387; cv=none; d=google.com; s=arc-20160816; b=McF2XnICUFJq3m+SwXIr6BdyQo+pN6ZtDU87eIPMZYdGc9dcSDR+XcdH9rkZi84izL /FL8e2xAFgif22pKc5yO3xg/xE1BZjr+R6dtkGlIRjl/SSrmZ5YX0hrnwqzFu3CeCUrG BMb5s/3XyYMLWArA7a30lPm0fR5A0I6G3Fpo4CoTlTghXI1Y94+2wrua+VZ9SzuqHHBB jOYSUWRzdUj72VuuAM7dRicEJWU0a2k2a0xUsB9QML/kXDezK8gjNKL3SOPqbV+Hz6kz 9Vj4axsmiOj3mEtu89a+JDOFPMcx1HH2R+1DcjvzhzoJyPqbaPHGF5Ovf2G9zGiUl5Tm 61BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=DXVlQTmUYghztDr+SLfAd1jckUjmZ0NF/GwGboHeNtg=; b=LZLvoCaI7qVXFQQ5rqhBWLfs6OdD4r1DSyiKutvOKbwqC6458PePrdcttIK9xSnSSY hvQcn1IjPyRQTkjacSKe5uD7JS6gdHMYvVyxV3Doam0POwppfdF6aeiDgGnVfrMC90tP BWnEukJPw7Aa480DCysBuvg/8y6yE+srhtFu+NMQBzg6Gm4EW6aU3yxTMYOCGQZWdwBk hRxhx4/0JtSMflOa6gyVXdwGvGZNZgx1Y3Bn0aoUsWewLNfT4GHd+2jvk/G163VcFifx QPRH7uIWGqsEwt6qnOINTEWs8vqzY3sM5CUKsRrIxMRDYUoAo4joFa6/bFtumnfmc3xy TRxg== ARC-Authentication-Results: i=1; mx.google.com; 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 186si21642485pfe.49.2018.05.07.03.36.13; Mon, 07 May 2018 03:36:27 -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; 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 S1752015AbeEGKfq (ORCPT + 99 others); Mon, 7 May 2018 06:35:46 -0400 Received: from ozlabs.org ([203.11.71.1]:50109 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbeEGKfp (ORCPT ); Mon, 7 May 2018 06:35:45 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40ffCh1rXzz9ryk; Mon, 7 May 2018 20:35:44 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Nicholas Piggin , Benjamin Herrenschmidt Cc: Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: Re: [PATCH 08/15] powerpc/powernv: implement opal_put_chars_atomic In-Reply-To: <20180501203721.7b60fcd8@roar.ozlabs.ibm.com> References: <20180430145558.4308-1-npiggin@gmail.com> <20180430145558.4308-9-npiggin@gmail.com> <1525168138.2325.100.camel@kernel.crashing.org> <20180501203721.7b60fcd8@roar.ozlabs.ibm.com> Date: Mon, 07 May 2018 20:35:42 +1000 Message-ID: <87zi1bbvnl.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nicholas Piggin writes: > On Tue, 01 May 2018 19:48:58 +1000 > Benjamin Herrenschmidt wrote: > >> On Tue, 2018-05-01 at 00:55 +1000, Nicholas Piggin wrote: >> > The RAW console does not need writes to be atomic, so relax >> > opal_put_chars to be able to do partial writes, and implement an >> > _atomic variant which does not take a spinlock. This API is used >> > in xmon, so the less locking that is used, the better chance there >> > is that a crash can be debugged. >> >> Same comment I already had :-) "atomic" in Linux tends to mean >> something else (ie, atomic context), so I'd rather have something >> like opal_put_chars_sync() or such... > > Oh yeah, I didn't ignore you, just... I thought atomic was okay. > atomic *also* tends to mean happens atomically. I think the in > atomic context meaning actually tends to be inatomic. > > Sync I actually thought could be more easily confused with > synchronous vs asynchronous here. I think we probably want opal_put_chars() to stay as it is. And then add a variant for the call (just xmon?) that want lock free behaviour. opal_put_chars_unlocked() or something? cheers