Received: by 10.192.165.148 with SMTP id m20csp3048140imm; Mon, 7 May 2018 05:52:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoQ47qER3zEw2nVr7xktt85Yhl8WAkn7AsaGXr1smWJbx7M9b0Sd1HQWt47nnrdbiG8Pe1c X-Received: by 2002:a17:902:bf08:: with SMTP id bi8-v6mr37668638plb.353.1525697577974; Mon, 07 May 2018 05:52:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525697577; cv=none; d=google.com; s=arc-20160816; b=POVR+LT0xn3pzXN7vu5feHZhgmSdDFhJJCvhgqt1OaDc1ZxVUg8fw/mUccU6GDT45t 7Snid9+EHtuzvvG01wWdFbw+kmisEx1KmhxX47VfDwupxtOVkXb8BXSlZh3+IttOl5lr cYp5EMpL8yq8WRVeSIhSL/xK1rUTRRdS6lAyA7NLL3OW8JGC+i4Xpgku+ExneY8DGD6T klSsI+EhiDgOSjCmU1werwYiU413bb1JxNenz0DiDfvsPFTCxps+IlD3URoHq4m8GxRC T1Pj34wcZbFdv1x7llpIGP6E6B1q3+PIGBeqZOI/mEeqo3uW1LVnik/KEI1Rar/w92Mw jxhQ== 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:arc-authentication-results; bh=spJjgW+RyNtu/J8GNLd3tjNsazE+4dPCxIIB4ORmFRA=; b=ctk3bDf4AxhG35bJL5FMb6j+H1NK5v9jwY+iLzRcFT9wfxYDV5Cs803vVB0jU3BE4I fL31HjWRss1SKT8C/CQa4kqwF/ZlNpIWSMU/M6dZwAoTCt/vstIbu/toPpmdiKyVUTkq uNM4arvYWW6lKc8vEvjmZ9JatLfLY82dAObBdoy4rblSEVcSN9xr9IgHfQ3vBS/Un6cg osN1S51kD2Uc8YQeKf0erPF5h+n1j9ZIxvcWAoebh3Fq4Smr17kHMq6dGiEtvnXHm6qv hpEswFzVLkICAietVOwL05Cz2ZYqn+/iTyUTlkGy493S6xzXnFFdL4+3GxWjAVniiAkC iMMQ== 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 w23-v6si21972685plq.214.2018.05.07.05.52.43; Mon, 07 May 2018 05:52:57 -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 S1752597AbeEGMvw (ORCPT + 99 others); Mon, 7 May 2018 08:51:52 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:50896 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752411AbeEGMvt (ORCPT ); Mon, 7 May 2018 08:51:49 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1fFfcI-0005Wh-UF; Mon, 07 May 2018 14:51:47 +0200 Date: Mon, 7 May 2018 14:51:46 +0200 From: Sebastian Andrzej Siewior To: Daniel Wagner Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven , linux-rt-users@vger.kernel.org, linux-serial@vger.kernel.org, linux-sh@vger.kernel.org, gregkh@linuxfoundation.org, Daniel Wagner Subject: Re: [PATCH v2] serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version Message-ID: <20180507125146.75crpaj2scav7mql@linutronix.de> References: <20180504163041.28726-1-wagi@monom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180504163041.28726-1-wagi@monom.org> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-04 18:30:41 [+0200], Daniel Wagner wrote: > --- a/drivers/tty/serial/sh-sci.c > +++ b/drivers/tty/serial/sh-sci.c > @@ -2890,16 +2890,16 @@ static void serial_console_write(struct console *co, const char *s, > unsigned long flags; > int locked = 1; > > - local_irq_save(flags); > #if defined(SUPPORT_SYSRQ) > - if (port->sysrq) > + if (port->sysrq) { > locked = 0; > - else > + local_irq_save(flags); how is this helping? You should see a splat after a sysrq request. > + } else > #endif > if (oops_in_progress) > - locked = spin_trylock(&port->lock); > + locked = spin_trylock_irqsave(&port->lock, flags); > else > - spin_lock(&port->lock); > + spin_lock_irqsave(&port->lock, flags); > > /* first save SCSCR then disable interrupts, keep clock source */ > ctrl = serial_port_in(port, SCSCR); Sebastian