Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp367246lqb; Tue, 4 Jun 2024 13:55:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVou7lr5Na5cWORg9xpAolGAWeIREuv6sOqvVVySiWy/Su34poZLF4C7o4KjEPMxusPaPTa5kHH/DRE2HR2XO1ek66K99+dBS3AdWclVw== X-Google-Smtp-Source: AGHT+IEvwovuhMEQGkNOK6On8tca4hZvCHuI7DA4fZ5+y3KOoFsZOK00BsWensg3+8rFxnvEPLPH X-Received: by 2002:a25:ace3:0:b0:de5:9f17:1ccc with SMTP id 3f1490d57ef6-dfacad294e4mr483177276.54.1717534544711; Tue, 04 Jun 2024 13:55:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717534544; cv=pass; d=google.com; s=arc-20160816; b=JIhfLEcJOI84gZ5vfY3JrlQD7ZRdr71jY3dd2rB0dhzMqcYd0g0oS1JPJyPP0FA+Id u89pDXz+/WOV62Q3c4Ojtxc0X/M+gpkhAi6kSmYehP1IA9sizrjtMQ4q9k/vNFsmcEw9 juE3v4r8/2+D4sQ7SUdlbIgDhk1IRky26m3HZZ9uTtY4Ml+tZQXqAVoUNBrEFxUWu1Lg 2ZsppVTPkXaWBp/SKioCxYiT2XHJosjMwgC7whdGxBzhifItqFdXu2Rox0wYrDP9GnfI kkmrPCMLS5k19utmL/MD3io/ouHkzPXFHHhhsjobuZVnjXhKTUFDRWX1JFBfztGlmzvR N45Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gg64iSqr/mSckukuwBMpxoYIpWAZsVrZRfY9nsLTW3I=; fh=jiJaoDF7oUwVZP5dGpX3eTVR/Xlt1/Fkzyp41O+Mgcg=; b=kLk6UUlxtumzygtL3fHOuxMTakJV49mxWZEWB8iRXY1Ac7lUCIgBkKl6YMsVAEI2oP b1KcxlW/jVjRFDbGehUBm07pMGnbVT4cqHtUeXEFFRzMqZtR3kmV7uzz6Xy8RLBVS8hE Sn2e5jvqCKj/tG6S5JEAJ0/0V5qvdIxU4wloTz8A2TF3JbwXDugywJrl1TsYqRmqjVSR GaUe7/F5H+7usGUz/0uZg+XVAtIYxqQmpWV1elduiFlvYfIUzJ8iEzLtvbtPRRvP1Cs5 sYkMjYr61zJ9wfhBznXmU14pyIMZdP1F0aBLgwnBT2wrJlSvvh6jLeM/BocA0ddjXxzc KCbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gaBz1gTQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a741f4bsi118227536d6.134.2024.06.04.13.55.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 13:55:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gaBz1gTQ; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 43D121C24AE7 for ; Tue, 4 Jun 2024 20:55:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6CF614BF98; Tue, 4 Jun 2024 20:55:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gaBz1gTQ" Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF05714658E for ; Tue, 4 Jun 2024 20:55:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717534539; cv=none; b=UDBaVwwIR673EpVjGcSF3r70jVqW8e/ki0Uqy/z6Cf8/+sJqk5WiTg8WcWnUiMwWlPm02iGPzJVJOeDqTc0fTuDSGHfLzzADp4C2kbvt5uFHYdtkoaQJawPynj1BaiQrXJyue891DbA0gVT+0Mnr/Va3HlgpEBx3BP+OcNlJjjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717534539; c=relaxed/simple; bh=gpaz2Bi3HJsVOuTsDcwBI7Dpk/AZeaZi3wbvNAUKuOc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hZHVJE9XBphCGcOWOoMgbGccis1NUYP3q2iUuq4tXubShA1s7loQUojvfwoXwDarrvVWsrMnAFHO5rcQYxY5OwrVF7tWLU+X0IjIt7nW8l5zovYTPncc/g5x4HY+AVkIer4LoCbogPGlE7qVFahtFdcMuVoVXZtRpymjJw956Mw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gaBz1gTQ; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2c199e37f4eso4905144a91.1 for ; Tue, 04 Jun 2024 13:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717534537; x=1718139337; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gg64iSqr/mSckukuwBMpxoYIpWAZsVrZRfY9nsLTW3I=; b=gaBz1gTQXwE24I9p0+gBpm3yVLzsG4On/UK25snBCD5PhIgiGNLkYb933AuSOnJAon KrMPyVOVlO4i2/wMhtVzmm5wZDrfzfeantb3B3NibW+2Wrlpj9AZ5Pa9ACXh+QLTFde1 cakN23cBrBW6Lo8sh0VZNy82JQ+m5rve9B2TNwkBH6i7iDO+IWhUujF5xUwRjtEB8P8n 48TSoPpfFXO/PCCwE4C1il0R15m2yjH+J34OXvRx+Q2fJcMGf3RxYfj0roJSu3BxDRlr bRg6bGSgbc0Zlhl2Cp1tSghPvhVdLno4wCLDjBuKy8MN9fH911o1pFnXg62qbyu2PEuX CZsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717534537; x=1718139337; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gg64iSqr/mSckukuwBMpxoYIpWAZsVrZRfY9nsLTW3I=; b=fHlASco+KizI5h9dM7s8+D0K453eTDWiT4nFY5Wgx7rXqLuvxh2v9y/yQCL9PlN3TA W8fqb1RoJ1XdgZi6l/SlzRvICdBqqa6kgRJnI2CockmLPI/Kdx3qJzwu3C/a9yYKwcN+ Lx/u07oK+wHIt2qfDaye3m2iyVoYSlupnVIK+O7rsawxRXDe6Q0S2EUOUA1n4iDGd6z3 ktojMH1EqJe1LyUCuH2eDBm5XxOHF85dUMV9vMImRd/TqV+nzAoQLuSwMS8uHQqvhd6j ldQl1sPBl4x/De1Mv13EYvUpMsCd9lcj0qAHBrPNDkd14a8oSxevmLa6vNnQ+Ji7FYa6 qTaA== X-Gm-Message-State: AOJu0YxKi8T7mqrwFYxW+gAvLhC7tluaC9H2y7JuHgXof0SE/S5iC/ML spU9k+gQFHTV821Ih7cpwTgCYXujI28UL2DXI8s5FAPrIn6LU6Y/ X-Received: by 2002:a17:90b:19d3:b0:2c1:9e98:70bb with SMTP id 98e67ed59e1d1-2c27db03e19mr601204a91.10.1717534536856; Tue, 04 Jun 2024 13:55:36 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:1327:f82:3fa9:728f]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c1c2831aefsm8607421a91.38.2024.06.04.13.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 13:55:36 -0700 (PDT) Date: Tue, 4 Jun 2024 13:55:34 -0700 From: Dmitry Torokhov To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ Message-ID: References: <87ed9c5yp1.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ed9c5yp1.ffs@tglx> On Tue, Jun 04, 2024 at 08:51:06PM +0200, Thomas Gleixner wrote: > On Thu, May 30 2024 at 11:07, Dmitry Torokhov wrote: > > Drivers often need to first disable an interrupt, carry out some > > action, and then reenable the interrupt. Introduce support for the > > "guard" notation for this so that the following is possible: > > > > ... > > > > scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) { > > guard(disable_irq)(&client->irq); > > > > error = elan_acquire_baseline(data); > > if (error) > > return error; > > } > > > > ... > > > > Signed-off-by: Dmitry Torokhov > > I assume you want to carry this through the input tree, so you can > modify the drivers. > > If so: > > Reviewed-by: Thomas Gleixner Thanks Thomas. I'll stick this patch into an immutable branch off v6.9 in case you (or someone else) wants to pull it in and start using it. Thanks. -- Dmitry