Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp311887lqb; Tue, 4 Jun 2024 12:05:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVy2lFpBnIQyNDzCi7Hp86U10XJtKZDH3EoxImju/uZ40TL514HHgsFJ4uVAk/Y4RsqiUPM1ptcW8nUyOoCMAGUWanu3rS5dhDRvFzpEA== X-Google-Smtp-Source: AGHT+IE5MvPLYZTjyomCqDY8BevOV6/b/jSmQ5m0i93B1Uon4egXTR/EbH4WVzqjuSgfrlpOmcxI X-Received: by 2002:a05:6a21:788d:b0:1b0:9b7:bbe3 with SMTP id adf61e73a8af0-1b2b6ad29aemr645655637.0.1717527907225; Tue, 04 Jun 2024 12:05:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717527907; cv=pass; d=google.com; s=arc-20160816; b=HQ1Fruhyh2A6iRugNUyNp51ycZ1/dm8+9MlMf6qVpmyTtUR1cMuJbAljMsfuG29iTQ nMjDjbcZOt+gCg/biC6g379fH1yb9LVrdC1+M/ZZogddsvTgbT1cFzHRoGARjLbqyH6M HKdzbG3sorqzxZGTkJ0pRJzGIysbUHEu6BUtt6HDEY6ZeXw5cwIlroctbgELjTYprVZm zhZw9GK4X2mjV/MC1vPXFA3EoS9g22ao8/xKomFPQ8bB4/QxiF6oqDahNv2kvlyKLYqt oqLvAnH2i7FIDWqlXjXHmZhobH/DVoOv94vMkPEbIGKmwqEP8tzpguKML3cun7MWcdy8 6bag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=HAhm0Ey841jUH4UQhrQFf67p0ofqwc+3nGUlsBTWj8Y=; fh=viiSxwCRd3ASKF4iig+eq0AuvfdSKvloLI4z5V7ZG0A=; b=x2XRggc2iIvHE+4OuOZg+XF+QT2DpqWBuQmwq8agJ9lg2zYkPmmGH5VMvOugdy3Qqn vWAM+r4TtdZce0I79B3DJALOiMiPmtJjV7fc+SfnoWKfwN+b7DJySxt496nkx8PdJzbN bNZuRWwAEqycyXLXFWvKWrsA5s56aAeGi8sXWhvs3VMLA21g1G9MEiUojwYZfv3oUGlW +1Sm4R933H0P6G3bED36qWyGnLDVGfQD8mxbGKZEqW62W0oYPE/A18N4LZu3u7e7rX9M gUN0RCPhzekYg2sYF3bFjRto2v6g6vg9/abxaLiMJ2SnW9LWX2UVDNYiURsSJniZRimk U/Ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="hg/2FuEQ"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-201255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-70242e64198si1068071b3a.391.2024.06.04.12.05.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="hg/2FuEQ"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-201255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1643FB26359 for ; Tue, 4 Jun 2024 18:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE9C714A4D4; Tue, 4 Jun 2024 18:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hg/2FuEQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AE2VjrNe" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CAF34A11 for ; Tue, 4 Jun 2024 18:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717527070; cv=none; b=cPUsUYpL7cwk3CwBKmnqqEwCvuFGv48sy5lAB7FV1qtymcATT2k0ywtuwX8FIRg4NwXBL4R1sDj5GDxCscnKp+AqfrFFKzp0YjAtiPL6K2/yIz2nH6cVjjxWjJ7WhNSm2BNTByqcHSihb/kcfbxHnyhDyFz25MMtm+COgMS5KHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717527070; c=relaxed/simple; bh=5VeXengSZeM+UAXHhPFpc5ktDmMspwy2C37spZviMN4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Ik9DQZsI58RB0P8eOGZLNY0ATj1R54MekZ/zXDKZ4zdr2pCdt8NI+7tW3v64Wi4lxomjUVcRMM/6rlfHH3Xw5h0Km+1RC1qhj0+aPgwIuWM6c/mxqNcBWqD998QRaKluudg9caWHbyyW+lfwX3ZnEdj3DzULYhqchXZ5Buyo6bA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hg/2FuEQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AE2VjrNe; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1717527067; 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=HAhm0Ey841jUH4UQhrQFf67p0ofqwc+3nGUlsBTWj8Y=; b=hg/2FuEQu92Uft/JGl95bRGLjUmiSm05GdL6lOImxx2UjtUePL5cVepZbgpWcNNcSlH5pJ i4x2nFKU4hBRlBM2xiJWLZvr52jbDUE8W4GaWoyMJ6eyAYppg6o9BJIC+obYVrqNPbCDsI ikFmCrOTYir52zfn00S2gcaGAbSpzs9azcm9QppfZpCE3oyl+9qZkgofr9L0HJI+IO61H3 V16v18VgItN2D0CnSwqKQWh2iBjt2UqQLv6zb/1u2mna8VZ7Eh5tmP7TQbOqZMWpjkeYdA UrH87d2TimR4zvnjSPH6BYO6+JQD2ht6CnUy/in/K7OiFHXrB5Th8l0944YqSw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717527067; 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=HAhm0Ey841jUH4UQhrQFf67p0ofqwc+3nGUlsBTWj8Y=; b=AE2VjrNecXKSy70inwKmAB5JLlKoXWV8p4Dr0oVFF4bxZIK3LZcxb4vLe4VCniaSJfR3j1 sg01t8F6syn0DxDQ== To: Dmitry Torokhov , linux-kernel@vger.kernel.org Cc: Peter Zijlstra Subject: Re: [PATCH] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ In-Reply-To: References: Date: Tue, 04 Jun 2024 20:51:06 +0200 Message-ID: <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 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