Received: by 10.192.165.148 with SMTP id m20csp4416848imm; Mon, 30 Apr 2018 18:43:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoz1VFLPKUlCqCPghEBxhDnzXe0y/HcuPFqbiqd2W0ITte2voI4HIl5I7msfGzuvkjxxlPk X-Received: by 2002:a63:41c5:: with SMTP id o188-v6mr11647326pga.280.1525139018252; Mon, 30 Apr 2018 18:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525139018; cv=none; d=google.com; s=arc-20160816; b=M5UVGVJOAeZ/aglQZhgLIfjq9L6LlJ6vih8P3Sic4b1565wUlNA7nA4+U63NEnfTr1 +TmfQKxR4CIB8ldiCte0sebpFyNrVRopbBtdkdsLb2kYDK8wP+BszgknvYdKdtK7/UCs 2gYmBbU0yx09mwzjRULOoJkn4iK4397/wKi/4o+EyRldjiLgL2bIJ/MESCR1SfYArv1j iqrKrF1UdeMUcHzT1fHMcS2qdbl6rWeEkW7ywZGB4cQlTJmX1YGGQR+FnmH3Dd+UGmHI u0IJuM83BAUpH4Da/120K45s0oA7df2GFEwNXP1z6PuJzLR9oNmbuxm7HCKm5DCjTo9z 4mMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=pS8rnZMf4UYiY5pQiLKbMa+y4gjwskC0PrkKKhsYDJE=; b=iC42oI49HwlTbVI/s8uiL25ELwX43Wi3/NczwYXKGpDs3c5alebGL5gGJOnFNVa04L hrrCJywKt64WRVH6jHwxq1exnEV81Nmn7in+Y7wxNPsyZuKj0CUaAnqTuncLXMkoAhHP yPD79i+BXkCDQT+rmbS23TB/4NOGWjmmI3WBZFrXA+wS13FgJxfcIasmTEj6vgtOveTv bksMFQSAd7FVncC1aYdDrWu6DQQrnj7+NDB/6j5+DYd3mYUKfcxrlZjDlVTT0ACw1C4l PiBOCFEf6BArCQFDSO1nxJxbz1vpC+DkpJbd41YXxHUC2mvAPR3DK4uyQeGKM4y20hJZ 79rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qGI6EDAK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si8325289plc.140.2018.04.30.18.43.06; Mon, 30 Apr 2018 18:43:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qGI6EDAK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755824AbeEABm1 (ORCPT + 99 others); Mon, 30 Apr 2018 21:42:27 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:44110 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755600AbeEABmY (ORCPT ); Mon, 30 Apr 2018 21:42:24 -0400 Received: by mail-pg0-f65.google.com with SMTP id 82-v6so7476670pge.11 for ; Mon, 30 Apr 2018 18:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pS8rnZMf4UYiY5pQiLKbMa+y4gjwskC0PrkKKhsYDJE=; b=qGI6EDAKxipSzgYctNqBOd4128t0ANh+YNYxoGod3h4VZyMR33rNPhQTnAA73KY2TN XqmxJlrtBuajxQDPzmMfik5zZorNVNPoNa0DKIoVBYvf/j1DLUyODLKboYL06xSBC+M7 LA+7i0FvUFGvQ1rLUvFpLlc0L34l/1I6ZDruTZUYiM/MQEvUVQq/LjENMZMiet4ZvwGH ZmY4eRrKdyzXA1BFFsEbXAM+J037mBhCjk4mSkd3UYBTRd5TAbM+OA8ho35bZa1kHVlD i32DE9mh0Ntv2K4WMrd0o4hVF8U3NInrTQkfmaQ2lCSLVp1pcrUNUlUuuQwF1O7aZUIa l2sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pS8rnZMf4UYiY5pQiLKbMa+y4gjwskC0PrkKKhsYDJE=; b=nVxq6O5Hf9Ubmk+++TkoCegrvEIs0uKn0aEdacNjiVKvLqKBhsd6SCYnCZ7wEr3UAi VKyTO8QWdJuXhvsSgOIMhXGU9dGv97HaKCxezgHVmnXSlYbnmM652v7PdNMi+xlC+fTh wPPCnUjHsjERLk4G1GRn+baV8Uy66mXu0WlqwH3kuQsL8Ewf1SsFz6XpGskvaVVDaHgi yjfPhvSCtclcXa8VtnqY+ZZ3ftBIQR8jZdjuR/p+IKlK5TF3d3IChBqJJoRu5wg7T843 zLGhcvNFVSm2T9nsrPDd+wOUwZwd+cEiNA9/E8vVdcD1aNrXZ8dTLu22m9nkd68tWlE3 1OuA== X-Gm-Message-State: ALQs6tD4HWeOeAri+tyYKPTDdCV7xxA6s3aBKNFCB5VevY+Nvr3f4cZE wVYKhgsoByF+5J15yL9SZtlTY72M4XM= X-Received: by 2002:a17:902:7046:: with SMTP id h6-v6mr5697132plt.249.1525138943833; Mon, 30 Apr 2018 18:42:23 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id f21sm15149490pfa.106.2018.04.30.18.42.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 18:42:23 -0700 (PDT) From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: Joel Fernandes , Steven Rostedt , Peter Zilstra , Ingo Molnar , Mathieu Desnoyers , Tom Zanussi , Namhyung Kim , Thomas Glexiner , Boqun Feng , Paul McKenney , Frederic Weisbecker , Randy Dunlap , Masami Hiramatsu , Fenguang Wu , Baohong Liu , Vedang Patel , kernel-team@android.com Subject: [PATCH RFC v5 3/6] srcu: Add notrace variant of srcu_dereference Date: Mon, 30 Apr 2018 18:42:01 -0700 Message-Id: <20180501014204.67548-4-joelaf@google.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180501014204.67548-1-joelaf@google.com> References: <20180501014204.67548-1-joelaf@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In this series, we are making lockdep use an rcuidle tracepoint. For this reason we need a notrace variant of srcu_dereference since otherwise we get lockdep splats since lockdep hooks may not have run yet. This patch adds the needed variant. Cc: Steven Rostedt Cc: Peter Zilstra Cc: Ingo Molnar Cc: Mathieu Desnoyers Cc: Tom Zanussi Cc: Namhyung Kim Cc: Thomas Glexiner Cc: Boqun Feng Cc: Paul McKenney Cc: Frederic Weisbecker Cc: Randy Dunlap Cc: Masami Hiramatsu Cc: Fenguang Wu Cc: Baohong Liu Cc: Vedang Patel Cc: kernel-team@android.com Signed-off-by: Joel Fernandes --- include/linux/srcu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 2ec618979b20..a1c4947be877 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -135,6 +135,11 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp) */ #define srcu_dereference(p, sp) srcu_dereference_check((p), (sp), 0) +/** + * srcu_dereference_notrace - no tracing and no lockdep calls from here + */ +#define srcu_dereference_notrace(p, sp) srcu_dereference_check((p), (sp), 1) + /** * srcu_read_lock - register a new reader for an SRCU-protected structure. * @sp: srcu_struct in which to register the new reader. -- 2.17.0.441.gb46fe60e1d-goog