Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp926070pxu; Fri, 23 Oct 2020 17:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYds0tHYbbYr+27GWXCbsWhrgvmIdawcH73vEBIgYOfup/UfellL9EOeFeOQqA+ScItxQh X-Received: by 2002:a17:906:b010:: with SMTP id v16mr4723910ejy.163.1603499780132; Fri, 23 Oct 2020 17:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603499780; cv=none; d=google.com; s=arc-20160816; b=gTWsptkvTwP4sEbo6nECsO1vkuhsUL16dcCTPM9YycOh2Z12rTo2QJQ0lhRnfxkHEV zKZVlLaD5QbmVsl5pmI1zr6y5Jh520erUlVOBRFhqT3TJEkO9QkW93tJPNGh5/Zs8nV/ vjEcoLWd7L48P05kyhSdjxtJtxzhpCkXl1mCNjAnoDZhDbJLdYbKvD/rOo8Oeg+Dm49/ gTC1HI+FtvmEeP/y9p6f+AYerrJ9ssujEaHGK/LWDT6rYmXmwc3m644SJcMzWIAGULxQ Naim6EeSDmBhQnodLJ7uJ4isT3xotzBWnA3jwh+xu+garN+1OkvrPbAod6zrvhScuxQm IN0A== 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:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=PWPxXpTrrlDAeAy6R37UaEC62YtNtDdRIHMGAEIcaW4=; b=l6PNBM5EoF9p5VUSBbsqMPy+YO49k/BcVYePxuqoyo9cIylVcNfOTIaEHcx+TmdBQj jUk1ZTi6oSyXrk00PCl8YXxUgVcNiu9r5vnBU55sV0bf5wbI58bYFFHN4M/B4jdohvF+ x2J99aHgA3Z2OQH95BTDCHnbz+Hd+FDuHJDVtfWH8FjKujBsgQRIKOvlSjszEWSPrmLX x69sNPGo363OsWnG5rFZG2Vptqdrrhl5Q5DFVwXg9tGrAlJQSSQlkQZgBDA8vQXHCal2 jwSFoLn38NG06kbX1O3xrRZCxKJLvDGlqdu9Olu//j/3gf0aXT8C6R5vD4EE9Y2vZu6j vmZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hqS9jtc7; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz8si1926303ejb.312.2020.10.23.17.35.58; Fri, 23 Oct 2020 17:36:20 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hqS9jtc7; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756835AbgJWVpU (ORCPT + 99 others); Fri, 23 Oct 2020 17:45:20 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56196 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756829AbgJWVpU (ORCPT ); Fri, 23 Oct 2020 17:45:20 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1603489518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PWPxXpTrrlDAeAy6R37UaEC62YtNtDdRIHMGAEIcaW4=; b=hqS9jtc72zZGGGvuARTIcDq9Bv39aoItwcwnJj5bZVZ2Y4JcL/OEvlg+F4rBW/3QvdAo5W o0oTfq/JEl4KlySZQgb8ctuo3u2t4yiY9b6aBcHTW1doqMSIHqCIOvyPOespByI8R6DteC Mnc2b44dqqRk9b+Qv75thSsNdMP1/hFPGgZwGYvIST3FPSH+Cr6RBt2I+41mJMlymMsCys mHJAgOydFcQv7eHmls5kMa3fy0LD5Pcz/XRmitDfDdEjcuX1a1GlLRAJpgSj9HpYAXHDLi D2rO3RQkEqlalHqnhcm0LAiOEq6O4vCeeKCmk5lcO2FbWHiaWTLhSE4ogtegpA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1603489518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PWPxXpTrrlDAeAy6R37UaEC62YtNtDdRIHMGAEIcaW4=; b=vN0BUdufar4GqRZsYtOJFbaVQZ+fsFLNAUb3ZoyM9mXLBSx29xYtazVk59Lodu4n6WWhfb 64PcddB3kDPYxGBw== To: Geert Uytterhoeven , Tian Tao Cc: Niklas =?utf-8?Q?S=C3=B6derlund?= , Zhang Rui , Daniel Lezcano , amitk@kernel.org, Linux-Renesas , Linux PM list , Linux Kernel Mailing List Subject: Re: [PATCH] thermal: replace spin_lock_irqsave by spin_lock in hard IRQ In-Reply-To: References: <1603249530-25218-1-git-send-email-tiantao6@hisilicon.com> Date: Fri, 23 Oct 2020 23:45:17 +0200 Message-ID: <877drg62he.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22 2020 at 14:51, Geert Uytterhoeven wrote: > On Wed, Oct 21, 2020 at 2:15 PM 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. >> > Is this also true if CONFIG_PREEMPT_RT=y, and all irq handlers execute > in the context of special tasks? 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. Famous last words... ... unless the driver does magic things like having a hrtimer armed which expires in hard interrupt context and touches the very same lock, but that's not the case in this particular driver. So the change itself is correct, but the change log could do with some polishing. :) Thanks, tglx