Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1052217lqt; Fri, 7 Jun 2024 06:55:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOYuYfAMks4DBjja9DHQEaDUab9DQxgfZWFn8V74Db3aNDLPVS+H+sxI/2yHkdud3Sk8UIFleIWQobCq3220H/8ixmL9vJjLp1BeV92Q== X-Google-Smtp-Source: AGHT+IFuT9dL0BN+VOORiTNkSmwlj8SUi4Uf8vkWVSUcYV5aj/85vNoAZJVgjdzvpRfifrL0sbtS X-Received: by 2002:aa7:88c8:0:b0:6f3:e6d6:7fde with SMTP id d2e1a72fcca58-7040c738f23mr2975317b3a.26.1717768526573; Fri, 07 Jun 2024 06:55:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717768526; cv=pass; d=google.com; s=arc-20160816; b=eetD0WFyvr+Snli4hY3ep+/wnFWDgDzxlOsiUlMHqGyr3FzfXRw+3mBhRMFfGrN4bt yY7aPXIWzScVU0++IOvkeaLBUvmFJdA7ElQapsgumKf0MVSCA93NUA5T/OmLt1SySB9F KMH3s9NEtabq/Ky0at/0rcH0qDYUZ9v3olu0DZLskMtTUnU29t6F4zXR2bcUUYIdIAIX PBAu5jkFTFHF5DuG2Xc+xjcP76H2wHW6FPfBCaFPkNufRgcE4aEF1yvJBKIP2aWGHSn5 PI9Q5/VXLNoiEPNHIXQOS4So5q9fOF7gfYGSw/3j2xWbUogv8lIj8qIG8v9fXXDvQ9Qr +DEQ== 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=a5TFPo8LFoQlHtTGJ0fO8j3vVvVYoqqauiwFRzKUJEI=; fh=pYTUp3ay4qn0zXaJBh9lFZD7LjCQPOGUidusMmT9Q4Y=; b=NsQd2BPLex9w/A7eWdXyJxUG4t4JswBF3VVwl1yZgabVeNTQGD7nnouy2tW5fckiR/ C5tolCVKxx+Q+xFY2q51hu/T+5FzE6Q3/Hh6N19OHS2hLWt3vYiqwUylExVpVebYvkR0 OwTS2QSiNARrLf+iLtbKsZxS+zU+ol2KlVZe/ZMcRZcTspJLW0FmVnMfYIQPGJMjI83X TBgHl5NAjhJ9XaU92qNGWqpBjAj60fFSDFdvxRtTPil2jsfc2ke5ZAl60zXtm0jDLNAy gqP9kV2FB2fRh2RElo3xL5o2EXs92UZT1JaINhHofR2iDHP/yHL7MZXhMDdndkFHctkr milw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SRaIZ4cL; 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-206206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206206-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-703fd39117fsi3101256b3a.32.2024.06.07.06.55.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:55:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SRaIZ4cL; 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-206206-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206206-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 320CD292232 for ; Fri, 7 Jun 2024 13:55:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE7BE194A53; Fri, 7 Jun 2024 13:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SRaIZ4cL"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0GuEBcVR" 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 6C7DE188CAD; Fri, 7 Jun 2024 13:55:17 +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=1717768518; cv=none; b=m19NgZ902NZ0gqkyKmotgh0FRs4VrjwsVtf0pHNsEMYa/ZEg5cRNfqw2zKdyAkTvHofJSKynz5Y7hFelY4x/s3iVixdAidhES159i2BKB5M02q6T3mohUoWOpqrWwufb7jVxH8UeHavOCA+//28c8A6VilSP+3GhnSLGFPSGDhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717768518; c=relaxed/simple; bh=MpGPHSF59x5sfLf51SEu8OM1/zIpfxVdvnp7NS10R64=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=BiLmUAnO3ybleW9RQdZsxSOpdmvOPmsp84RMDGCA0ZbxpUEOEZMjATc0Am7yRefvlFhdcEsvAKgv3Eb/H4xSJE9GvtijGs1R4csBay1SzmH4fufrcvIbtwepbyOPTkEH/62ftzXlDCCedwAzQZJzde59Eoupt6j9CwDrCIlLPhA= 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=SRaIZ4cL; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0GuEBcVR; 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=1717768504; 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=a5TFPo8LFoQlHtTGJ0fO8j3vVvVYoqqauiwFRzKUJEI=; b=SRaIZ4cLKtg8sxove6CR7eHic/rlgNK1XRrEhdiQ32xXjJjN8e3WW+wyW+vwnw/S1wf1Gw 8b0/naQekhSYmzdNCIqrVMoqMcRapurCCK2o4Lv+yj9hm/17/9+2h8rDsdaQksLoMjE3pl JP4e2FWevW198JxkWG2oolpxHo1eF7gN5CjmbjrpHNnLZiILaGgq3qF6ZwVQkju0pxJ6zp FQauAxc4BYHR5XIBo1WAAAc43tDxbHXXr6NILy5aQHtxdNNUnphyxoQdSNA2eY/RE1YyLq vZI4ZCYj0AE6g7+/n5wjO17bfqTMHDLHCXjRWCkqY77rard5EdpnuH/kiJ9nKg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717768504; 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=a5TFPo8LFoQlHtTGJ0fO8j3vVvVYoqqauiwFRzKUJEI=; b=0GuEBcVR3G2ikuUk5jZsMQ8QElmbCLMuZwyUgTwWd/OQfe3cgT/2Z0zzHb/6Sj5zK/w6yg 78b3JjUWmuvvD/CA== To: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , Daniel Bristot de Oliveira , Boqun Feng , Daniel Borkmann , Eric Dumazet , Frederic Weisbecker , Ingo Molnar , Jakub Kicinski , Paolo Abeni , Peter Zijlstra , Waiman Long , Will Deacon , Sebastian Andrzej Siewior Subject: Re: [PATCH v5 net-next 01/15] locking/local_lock: Introduce guard definition for local_lock. In-Reply-To: <20240607070427.1379327-2-bigeasy@linutronix.de> References: <20240607070427.1379327-1-bigeasy@linutronix.de> <20240607070427.1379327-2-bigeasy@linutronix.de> Date: Fri, 07 Jun 2024 15:55:03 +0200 Message-ID: <878qzg26yw.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 Fri, Jun 07 2024 at 08:53, Sebastian Andrzej Siewior wrote: > Introduce lock guard definition for local_lock_t. There are no users > yet. > > Signed-off-by: Sebastian Andrzej Siewior > --- > include/linux/local_lock.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/include/linux/local_lock.h b/include/linux/local_lock.h > index e55010fa73296..82366a37f4474 100644 > --- 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_GUARD(local_lock, local_lock_t __percpu*, > + local_lock(_T), > + local_unlock(_T)) > +DEFINE_GUARD(local_lock_irq, local_lock_t __percpu*, > + local_lock_irq(_T), > + local_unlock_irq(_T)) > +DEFINE_LOCK_GUARD_1(local_lock_irqsave, local_lock_t __percpu, > + local_lock_irqsave(_T->lock, _T->flags), > + local_unlock_irqrestore(_T->lock, _T->flags), > + unsigned long flags) > + > #endif Reviewed-by: Thomas Gleixner