Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1756798rdd; Thu, 11 Jan 2024 08:21:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8EfplXgeo03PhUe79s/3c3wGShpQu17aA1SCP3v7HtuHuz8IVl5S2QkYV2YmgNR18H+kR X-Received: by 2002:a05:620a:1a8d:b0:783:3f20:4131 with SMTP id bl13-20020a05620a1a8d00b007833f204131mr32421qkb.64.1704990119510; Thu, 11 Jan 2024 08:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704990119; cv=none; d=google.com; s=arc-20160816; b=V5Go6xivP1akWWFIrcthv5T1hf3DESvX5BDsTGIj9bjZwkQMY3PxhdjmFzQ6i4wsny 4vRLIIdURsB0k7qkN0vi9MvXHqpxRj9SF5TiunUIH/E1iJD+WfbYCT3cl4xDYS+grITX j/9BSx7tZU1MxBBpv9bHzG8yHY2JPM5R1OC7+0uDXfJypST9wRVUpOILjnQVBpY7etNy jxjYn3+l8IrDXZjlsdUZi4GCNbRX8Q08m2bevFbSTZckuuj6UfSi+yYvkbRq4XHh4pZv 75tjeDYyRwC9Mb0lI0QF8KpdAcPgXbERHB3MuJldxWo67nvTH+5klN+uT85/BmAEUWg9 QOMg== ARC-Message-Signature: i=1; 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:dkim-signature:dkim-signature:date; bh=YOLOzAjuYOas3k2x1TDtMxzw0TAxfNtFSi0XJdyBOuw=; fh=3bUW+faxFEXVCLryxfjxm52dICSsgXeijN8+mV3crCk=; b=ZEcC3zy1YRDw3Zne1SHmltj6ebjt0ZwYE+aNp5DWoSCyfLWazCthWtPJaOY+iULvWI n2adt2wLufjN4OqJc+DR7Yz1CmVSPV2hKRyMzAhlBNvGaHozbOxlvbJHEE8Uz49FbOlT KRAJhhk2gqHwMRPSq5N5d0Ce/ljIOHvGC4E/MqiXraKOixoFO98Bmaxem8U11PQdqFF3 CZK94Cy+8ZoZ1H8dK3h58bp6SUd6Mm11H9XwVf5/RSJdBi/Ya5gbEQ9PignQx4gTIGE7 in9kd3cCAIo7Mf8fHrKANjAudg02dfBoxz7DzTUT3oNCMW9ectUlfujvlE4V1Glaww5J bn0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IqQhEeiy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-23851-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vy2-20020a05620a490200b007831a33374bsi1150523qkn.461.2024.01.11.08.21.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 08:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23851-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=@linutronix.de header.s=2020 header.b=IqQhEeiy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-23851-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23851-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 305A91C2366E for ; Thu, 11 Jan 2024 16:21:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 597E05024B; Thu, 11 Jan 2024 16:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IqQhEeiy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="M1SBdvHL" 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 2010756B66; Thu, 11 Jan 2024 16:19:19 +0000 (UTC) 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 Date: Thu, 11 Jan 2024 17:19:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1704989957; 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=YOLOzAjuYOas3k2x1TDtMxzw0TAxfNtFSi0XJdyBOuw=; b=IqQhEeiyfpazk/Y9GG+PbHwfbR47wNC8Gj7JipnWsmQeEGGfThXzwW76YCyO3K3WgtO9DB pOTYmZFJfnG+WRDytuVbnrYV0j+Ke6SnMNW2zfajvn+pcWatTDYtDH+BdbCHwLPZOnFFBY VCcEizb76GmaF8xOMsKRFnOtItrsU/Nwdj1Xbv4kvu9uiCe7xkIROY1k95cKQe7PzOZ+ux kzSVLMuFSl6hImnDirJOFujtBL16aurVJCk5Lhkki+hLpXrExuONuHKAUs6jI9bKknuwHU 9uorA79s+84aP3oUaEFvxJ9526xHNyCYF0kfNGqy3PwrMmYbsdmDuQ0nnjidJw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704989957; 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=YOLOzAjuYOas3k2x1TDtMxzw0TAxfNtFSi0XJdyBOuw=; b=M1SBdvHLQqhI3beZkl5BBaVsgKfakdiJKYfOZCVrRkZnnMpfLQ+0hjL1fi1g5bjkdbb36z Lz955hH+qNGMKeDg== From: Sebastian Andrzej Siewior To: Paolo Abeni Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Peter Zijlstra , Thomas Gleixner , Waiman Long , Will Deacon Subject: Re: [PATCH net-next 01/24] locking/local_lock: Introduce guard definition for local_lock. Message-ID: <20240111161915.QlfL1DLS@linutronix.de> References: <20231215171020.687342-1-bigeasy@linutronix.de> <20231215171020.687342-2-bigeasy@linutronix.de> 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=utf-8 Content-Disposition: inline In-Reply-To: On 2023-12-18 09:16:49 [+0100], Paolo Abeni wrote: > > --- a/include/linux/local_lock.h > > +++ b/include/linux/local_lock.h > > @@ -51,4 +51,15 @@ > > #define local_unlock_irqrestore(lock, flags) \ > > __local_unlock_irqrestore(lock, flags) > > > > +DEFINE_LOCK_GUARD_1(local_lock, local_lock_t, > > + local_lock(_T->lock), > > + local_unlock(_T->lock)) > > +DEFINE_LOCK_GUARD_1(local_lock_irq, local_lock_t, > > + local_lock_irq(_T->lock), > > + local_unlock_irq(_T->lock)) > > DEFINE_GUARD should fit for the 2 above, right? Yes, that will work. Let me update it. > Cheers, > > Paolo Sebastian