Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp626361pxj; Fri, 7 May 2021 16:48:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWqqIJNQ/hVVy8c0UsS9xuYRNHJ0ajuK7f4wQs8rdT6MJbzmAPLE4I4CeiKfynuEG/6VRy X-Received: by 2002:a17:906:2546:: with SMTP id j6mr12900368ejb.51.1620431319612; Fri, 07 May 2021 16:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620431319; cv=none; d=google.com; s=arc-20160816; b=K1NfwEACxOVEBGpAQlsoUIGhNV48DWsYzRvOYL0jms4MNqc0VTElUY6y2TUIdGnWR0 hUYaTqk1KrCJyUhKst7H456mamNb5ETjjQiVzWZue9+vNDJipHbnFETDU8aE+YJIlWYy B3SyMUkz8wcqtLQEnYgfz8M5R5RE0+xZg1L7557KN81Z4ffVgqZCKslleD28tte1OzYV PgmV+4JzyikAd/Ktd3XLpPkqcOf4Yy1FIk6j8VbDOexWNLPH1dkCMzGXvH9Mx3ZIiDKa 9rG8Hdc0ngf9lPMTAualFC7XkVz+GlrFfvEt9aSNKEH6FfbpmcjGu1Iahji+yhFaf1h7 Uovg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qEw546L1pyyP6yyAS45idSq4mQ5V10FYvvZmTQkGvPA=; b=FDdcfCvgML9sqPZWp5tDSTavHERI16kN60kGyD8C72WB17HdbDwrovZsYwxM7E5Cx5 b4yRufruLoD+hdcANgzASMGWgM8dzn69ZqMhxGJsjl+In8uIgMiiAT3C0jRtpMQzcPuU h8zY5xMCPxBTvqOAy7BHjGGCFZHzHq9p+I3adt6a0NZY39nuQEi08g9EwpxRoesbYOc1 qo9MG9KGV+CwLZeX8spt0fmFGEMjo7YTcfBvU6Z8y5KOpay5p1XHE87aaSqH/KQhDzGy 7kuo2dzvtNqYfqIVjg8BjJgejKX1v+DEgWf6KuiUZNp7r+N+Ih8ZNfGAcf/CYj0N61uv /DOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc12si4742378edb.541.2021.05.07.16.48.15; Fri, 07 May 2021 16:48:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbhEGXs0 (ORCPT + 99 others); Fri, 7 May 2021 19:48:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:50000 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbhEGXsZ (ORCPT ); Fri, 7 May 2021 19:48:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 63708B036; Fri, 7 May 2021 23:47:24 +0000 (UTC) From: Davidlohr Bueso To: a.darwish@linutronix.de Cc: bigeasy@linutronix.de, peterz@infradead.org, tglx@linutronix.de, shung-hsi.yu@suse.com, dave@stgolabs.net, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH v2] seqlock,lockdep: Only check for preemption_disabled in non-rt Date: Fri, 7 May 2021 16:47:13 -0700 Message-Id: <20210507234713.86097-1-dave@stgolabs.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210507233951.78950-1-dave@stgolabs.net> References: <20210507233951.78950-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This silences the writer hitting this nonsensical warning on PREEMPT_RT. Reported-by: Shung-Hsi Yu Signed-off-by: Davidlohr Bueso --- v2: Resending because I had left out some small comments I had meant to add. include/linux/seqlock.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index f61e34fbaaea..2ce3e1efc9a9 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -268,7 +268,9 @@ static inline bool __seqprop_preemptible(const seqcount_t *s) static inline void __seqprop_assert(const seqcount_t *s) { +#ifndef CONFIG_PREEMPT_RT lockdep_assert_preemption_disabled(); +#endif } #define __SEQ_RT IS_ENABLED(CONFIG_PREEMPT_RT) @@ -529,6 +531,8 @@ static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass) * only if the seqcount write serialization lock is associated, and * preemptible. If readers can be invoked from hardirq or softirq * context, interrupts or bottom halves must be respectively disabled. + * The PREEMPT_RT case relies on the reader serializing via LOCK+UNLOCK, + * so the context is preemptible. */ #define write_seqcount_begin(s) \ do { \ -- 2.26.2