Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp652390pxx; Mon, 26 Oct 2020 18:11:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdv9F6nH6wJ5ZBigjMKMSCOm7MWKbYA35ph93v2W8N1pYURbghe0eWCuccWj/gCYxu6VZS X-Received: by 2002:a17:906:3614:: with SMTP id q20mr13090618ejb.297.1603761075415; Mon, 26 Oct 2020 18:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603761075; cv=none; d=google.com; s=arc-20160816; b=LhWMKM6pTj3srx1f/uzzeRyLAzrNO4xTKiotc6BwXswjZg1xgZvrRg2RxX+RdIF5Ex Z7qxf4EfzQpnHqu1jHYusX1lI/uQRlhlDRE67Yhh7jCQ5+c9xewWGv1UpRVeFBF53nNP MmlokXVbWttABPPrbdwV7IVk1mk5E7b6oKK3CNqxDFud/0O9WpCgut+wHMGbQrUw/6yb 1S8SNPMxXxjsSvjCZPVB2kmvylvRFmXHpyE3v0Ek8CYD5m1bNtf62zvA+4mrLi60Biln 40xCbGxebTWvhXX8FQNo9FcsDXDEYEwgTgM3oaNtibwGfgp+n0xlc/kfBH6c4H5dXvny VHvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=icY59Tqi3vY5Zps6I9QRIZXB3lpOv7tbN2B7bQLpmh8=; b=cUPVEaPJOVS7prtTbsABq+8xVJNoYGGXMiEXHgrBDAcQEMExLdcPV4/ejzLrezr6AT RKjS7k/rOdqGrYXDNjmHmxyTWVkLFrvMZt70aeAOMeZ+bYvTgAIR89nrjzv6iXxQnj+6 QtWiO6K4KbsnDcZNyXYce//Bu/pvy8QndJSEmdkKNXUO1ZeLZ6ABWDdr4OM+V+9PRNpd Jm+LMajU0jVl3Zdf55hlwf9s2WGgabod1G/Ukxbs4G59DYOJBpe+ks1nTX4WVzNJ5oGV 99rNYcycRWcxIvOJ8+WkyAEaLTLC+wot1SVC6b4Qq4+/DTt5xQ6F5zLVZwqLSOLzrEsM /FOg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si7951846edv.153.2020.10.26.18.10.53; Mon, 26 Oct 2020 18:11:15 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442452AbgJ0BGC (ORCPT + 99 others); Mon, 26 Oct 2020 21:06:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:5423 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439444AbgJ0BGB (ORCPT ); Mon, 26 Oct 2020 21:06:01 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CKtn76hkWz6yYb; Tue, 27 Oct 2020 09:06:03 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Tue, 27 Oct 2020 09:05:50 +0800 From: Tian Tao To: , , , , , , Subject: [PATCH] thermal: rcar: replace spin_lock_irqsave by spin_lock in hard IRQ Date: Tue, 27 Oct 2020 09:06:30 +0800 Message-ID: <1603760790-37748-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On RT or even on mainline with 'threadirqs' on the command line all interrupts which are not explicitly requested with IRQF_NO_THREAD run their handlers in thread context. The same applies to soft interrupts. That means they are subject to the normal scheduler rules and no other code is going to acquire that lock from hard interrupt context either, so the irqsave() here is pointless in all cases. Signed-off-by: Tian Tao --- drivers/thermal/rcar_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 5c2a13b..6ae757d 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -409,16 +409,15 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) { struct rcar_thermal_common *common = data; struct rcar_thermal_priv *priv; - unsigned long flags; u32 status, mask; - spin_lock_irqsave(&common->lock, flags); + spin_lock(&common->lock); mask = rcar_thermal_common_read(common, INTMSK); status = rcar_thermal_common_read(common, STR); rcar_thermal_common_write(common, STR, 0x000F0F0F & mask); - spin_unlock_irqrestore(&common->lock, flags); + spin_unlock(&common->lock); status = status & ~mask; -- 2.7.4