Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965108AbdCVRda (ORCPT ); Wed, 22 Mar 2017 13:33:30 -0400 Received: from mx0a-00010702.pphosted.com ([148.163.156.75]:54201 "EHLO mx0b-00010702.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935400AbdCVRdV (ORCPT ); Wed, 22 Mar 2017 13:33:21 -0400 Date: Wed, 22 Mar 2017 11:18:56 -0500 From: Julia Cartwright To: Julia Lawall CC: Gilles Muller , Nicolas Palix , Michal Marek , , , Thomas Gleixner , Sebastian Andrzej Siewior , Linus Walleij , Subject: Re: [PATCH v2 1/9] Coccinelle: locks: identify callers of spin_lock{,_irq,_irqsave}() in irqchip implementations Message-ID: <20170322161856.GJ10423@jcartwri.amer.corp.natinst.com> References: <48a11ad61edb4bec130f2ae0d46fc4e7d4855044.1490135047.git.julia@ni.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-22_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703220142 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-22_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=30 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703220141 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1605 Lines: 37 On Wed, Mar 22, 2017 at 10:54:15AM +0100, Julia Lawall wrote: > On Tue, 21 Mar 2017, Julia Cartwright wrote: > > On PREEMPT_RT, the spinlock_t type becomes an object which sleeps under > > contention. The codepaths used to support scheduling (irq dispatching, arch > > code, the scheduler, timers) therefore must make use of the > > raw_spin_lock{,_irq,_irqsave}() variations which preserve the non-sleeping > > spinlock behavior. > > > > Because the irq_chip callbacks are invoked in the process of interrupt > > dispatch, they cannot therefore make use of spin_lock_t type. Instead, the > > usage of raw_spinlock_t is appropriate. > > > > Provide a spatch to identify (and attempt to patch) such problematic irqchip > > implementations. > > > > Note to those generating patches using this spatch; in order to maintain > > correct semantics w/ PREEMPT_RT, it is necessary to audit the > > raw_spinlock_t-protected codepaths to ensure their execution is bounded and > > minimal. This is a manual audit process. > > > > See commit 47b03ca903fb0 ("pinctrl: qcom: Use raw spinlock variants") as an > > example of _one_ such instance, which fixed a real bug seen in the field. > > > > Cc: Thomas Gleixner > > Cc: Sebastian Andrzej Siewior > > Cc: Linus Walleij > > Signed-off-by: Julia Cartwright > > Acked-by: Julia Lawall Thanks, Julia. How do these semantic patches normally land? It looks like they quite a few have gone through the kbuild tree, is this the norm? Thanks, Other Julia