Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp294810pxb; Thu, 19 Nov 2020 01:05:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoi6Mxn+XwAoRtFaLPJCemXEkKfilH5yUP8Hg1Lx0E0fcAqaSCKcOWqnFqPBDdn/xRx8AR X-Received: by 2002:a17:906:60c4:: with SMTP id f4mr27759704ejk.336.1605776740892; Thu, 19 Nov 2020 01:05:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605776740; cv=none; d=google.com; s=arc-20160816; b=a8vkE5k1QfhGx6AfGFrj73kT0QRnFt5exeQZw9C9T1Xo2+KY/gHfyF0CFNmN5A2j7+ Y26d6Cp3um121Di1SPHIvGTzG1d3Yga5OcjhuCW2fYwME83Ybv/Unl8zsS/WRZZSIXVV 5UOMy6CzS9lYe9PC9NZAeagAEy8+QoSpke869rZTXiWeCUhOjDQi7WSY596BkWADc8U4 aRZckRWP7B9ptAPJ/SJst106ywso10Q7WLfL11Aaxy1UAxYso9rLR2oSM7arx2Kb4vHx wTqcpmIGnclzTtiAby+29yP4JB+ifJ8d91z8JnJ4OwPMTo/ILK8JQziLVHG8Cynoth8x +Mmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=4EQbK8dZn3wmlGNgXi+byhifmTHWQPZyV9gwXQJzxwQ=; b=betzeVK5Es+njE7bmXFms9b0GExti7SiQyYGS/DPGJXT+3dnKLggrLt5Pp50Cg32UH TR1pc3dBDjpp4xTgf+/ME4/ymu4JwYHB0QSiOLi8i6EtaMEcO6ZhWzxaZcM7/xIMOUmU G8buF9S6Y3BNsBkAd9XK++gwiMg+iH39SHfK7hPdHIS/YH0M9hjRChuabjK6l7iG3r8x /H67XnLvx7fP3bjz6y3szJRWXzcuziv+R8r+gAtpdgsoFUO5URTST0BwjPTgXuhtgT1s 4PC/whFX/QxHu9QtssvVJSQu9rJ0LWiBBMO0Hz4toX4ntp+JyyIz5Kdem2fe/+1U6Gbo ucug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd12si16680875edb.382.2020.11.19.01.05.16; Thu, 19 Nov 2020 01:05:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbgKSJDf (ORCPT + 99 others); Thu, 19 Nov 2020 04:03:35 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35584 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725648AbgKSJDf (ORCPT ); Thu, 19 Nov 2020 04:03:35 -0500 Received: by mail-ed1-f67.google.com with SMTP id cf17so1464230edb.2; Thu, 19 Nov 2020 01:03:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4EQbK8dZn3wmlGNgXi+byhifmTHWQPZyV9gwXQJzxwQ=; b=CN5/QZaGd+rDpapRyXs+Nfn4ucDGnmcsY/bSSk3RiDLU1LeSMmAqvYne5NiSzO2VZo NgYSWSDq0lw84nVUCPd9pFBEybn9il6yz0gL2KN3bYYTEYeXejKLH28Ufdxpo9XGmYEM xB70tvy3URsDyUNrs5HiHzgAw/LwZtcA3qp09bMM2eAhU8PmV1MtvvtPg06mw7ufsbOQ gNmB6pqrnTcTa/eOMxhVd1ZPmZ4Hyi98tSxSh5ItFWBpXHGw+AkcHroX5V/bB9awwcS4 wpGyVlKPc5YRvHvW9vOZ6smIWhMQ3Hu7E1b1s/dNG2+0msxpheUyBe6jU0K+VR3RJtf6 z81g== X-Gm-Message-State: AOAM530oXhMs/bVom1ssLJqIdYEwqWeVSW7j3rEbmpBqNU2BZzLgKLmp 2EiQ39IiqyzJMrG4UStjzZw1FXhVjJA= X-Received: by 2002:aa7:c886:: with SMTP id p6mr28956302eds.352.1605776612681; Thu, 19 Nov 2020 01:03:32 -0800 (PST) Received: from ?IPv6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id n22sm773330edo.43.2020.11.19.01.03.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2020 01:03:31 -0800 (PST) Subject: Re: [PATCH] tty: serial: replace spin_lock_irqsave by spin_lock in hard IRQ To: Tian Tao , gregkh@linuxfoundation.org, afaerber@suse.de, manivannan.sadhasivam@linaro.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1605776489-16283-1-git-send-email-tiantao6@hisilicon.com> From: Jiri Slaby Message-ID: <5d722862-f0a8-629e-b01e-5269350762e5@kernel.org> Date: Thu, 19 Nov 2020 10:03:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <1605776489-16283-1-git-send-email-tiantao6@hisilicon.com> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19. 11. 20, 10:01, Tian Tao wrote: > The code has been in a irq-disabled context since it is hard IRQ. There > is no necessity to do it again. > > Signed-off-by: Tian Tao Reviewed-by: Jiri Slaby > --- > drivers/tty/serial/owl-uart.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c > index c149f8c3..472fdaf 100644 > --- a/drivers/tty/serial/owl-uart.c > +++ b/drivers/tty/serial/owl-uart.c > @@ -251,10 +251,9 @@ static void owl_uart_receive_chars(struct uart_port *port) > static irqreturn_t owl_uart_irq(int irq, void *dev_id) > { > struct uart_port *port = dev_id; > - unsigned long flags; > u32 stat; > > - spin_lock_irqsave(&port->lock, flags); > + spin_lock(&port->lock); > > stat = owl_uart_read(port, OWL_UART_STAT); > > @@ -268,7 +267,7 @@ static irqreturn_t owl_uart_irq(int irq, void *dev_id) > stat |= OWL_UART_STAT_RIP | OWL_UART_STAT_TIP; > owl_uart_write(port, stat, OWL_UART_STAT); > > - spin_unlock_irqrestore(&port->lock, flags); > + spin_unlock(&port->lock); > > return IRQ_HANDLED; > } > -- js suse labs